@@ -79,10 +79,10 @@ _cat_size(x::AbstractArray, i) = size(x, i)
79
79
_cat_sizes (x, dims) = ntuple (i -> _cat_size (x, i), dims)
80
80
81
81
function cat_any (:: Val{maxdim} , :: Val{catdim} , args:: Vector{Any} ) where {maxdim,catdim}
82
- szs = Dims{maxdim}[_cat_sizes (a, maxdim) for a in args]
82
+ szs = Dims{maxdim}[_cat_sizes (a, Val ( maxdim) ) for a in args]
83
83
out = Array {Any} (undef, check_cat_size (szs, catdim))
84
- dims_before = ntuple (_ -> (:), catdim- 1 )
85
- dims_after = ntuple (_ -> (:), maxdim- catdim)
84
+ dims_before = ntuple (_ -> (:), Val ( catdim- 1 ) )
85
+ dims_after = ntuple (_ -> (:), Val ( maxdim- catdim) )
86
86
cat_any! (out, dims_before, dims_after, args)
87
87
end
88
88
104
104
105
105
@noinline cat_mismatch (j,sz,nsz) = throw (DimensionMismatch (" mismatch in dimension $j (expected $sz got $nsz )" ))
106
106
function check_cat_size (szs:: Vector{Dims{maxdim}} , catdim) where {maxdim}
107
- isempty (szs) && return ntuple (_ -> 0 , maxdim)
107
+ isempty (szs) && return ntuple (_ -> 0 , Val ( maxdim) )
108
108
sz = szs[1 ]
109
109
catsz = sz[catdim]
110
110
for i in 2 : length (szs)
0 commit comments