@@ -29,7 +29,7 @@ julia> size(A,3,2)
2929"""
3030size (t:: AbstractArray{T,N} , d) where {T,N} = d <= N ? size (t)[d] : 1
3131size (x, d1:: Integer , d2:: Integer , dx:: Vararg{Integer, N} ) where {N} =
32- (size (x, d1), size (x, d2), ntuple (k-> size (x, dx[k]), Val{N} )... )
32+ (size (x, d1), size (x, d2), ntuple (k-> size (x, dx[k]), Val (N) )... )
3333
3434"""
3535 indices(A, d)
@@ -955,13 +955,13 @@ function _getindex(::IndexCartesian, A::AbstractArray{T,N}, I::Vararg{Int, N}) w
955955 getindex (A, I... )
956956end
957957_to_subscript_indices (A:: AbstractArray , i:: Int ) = (@_inline_meta ; _unsafe_ind2sub (A, i))
958- _to_subscript_indices (A:: AbstractArray{T,N} ) where {T,N} = (@_inline_meta ; fill_to_length ((), 1 , Val{N} )) # TODO : DEPRECATE FOR #14770
958+ _to_subscript_indices (A:: AbstractArray{T,N} ) where {T,N} = (@_inline_meta ; fill_to_length ((), 1 , Val (N) )) # TODO : DEPRECATE FOR #14770
959959_to_subscript_indices (A:: AbstractArray{T,0} ) where {T} = () # TODO : REMOVE FOR #14770
960960_to_subscript_indices (A:: AbstractArray{T,0} , i:: Int ) where {T} = () # TODO : REMOVE FOR #14770
961961_to_subscript_indices (A:: AbstractArray{T,0} , I:: Int... ) where {T} = () # TODO : DEPRECATE FOR #14770
962962function _to_subscript_indices (A:: AbstractArray{T,N} , I:: Int... ) where {T,N} # TODO : DEPRECATE FOR #14770
963963 @_inline_meta
964- J, Jrem = IteratorsMD. split (I, Val{N} )
964+ J, Jrem = IteratorsMD. split (I, Val (N) )
965965 _to_subscript_indices (A, J, Jrem)
966966end
967967_to_subscript_indices (A:: AbstractArray , J:: Tuple , Jrem:: Tuple{} ) =
@@ -1204,7 +1204,7 @@ cat_shape(dims, shape::Tuple) = shape
12041204
12051205_cshp (ndim:: Int , :: Tuple{} , :: Tuple{} , :: Tuple{} ) = ()
12061206_cshp (ndim:: Int , :: Tuple{} , :: Tuple{} , nshape) = nshape
1207- _cshp (ndim:: Int , dims, :: Tuple{} , :: Tuple{} ) = ntuple (b -> 1 , Val{ length (dims)} )
1207+ _cshp (ndim:: Int , dims, :: Tuple{} , :: Tuple{} ) = ntuple (b -> 1 , Val ( length (dims)) )
12081208@inline _cshp (ndim:: Int , dims, shape, :: Tuple{} ) =
12091209 (shape[1 ] + dims[1 ], _cshp (ndim + 1 , tail (dims), tail (shape), ())... )
12101210@inline _cshp (ndim:: Int , dims, :: Tuple{} , nshape) =
@@ -1227,7 +1227,7 @@ end
12271227_cs (d, a, b) = (a == b ? a : throw (DimensionMismatch (
12281228 " mismatch in dimension $d (expected $a got $b )" )))
12291229
1230- dims2cat (:: Type{ Val{n}} ) where {n} = ntuple (i -> (i == n), Val{n} )
1230+ dims2cat (:: Val{n} ) where {n} = ntuple (i -> (i == n), Val (n) )
12311231dims2cat (dims) = ntuple (i -> (i in dims), maximum (dims))
12321232
12331233cat (dims, X... ) = cat_t (dims, promote_eltypeof (X... ), X... )
@@ -1291,7 +1291,7 @@ julia> vcat(c...)
12911291 4 5 6
12921292```
12931293"""
1294- vcat (X... ) = cat (Val{ 1 } , X... )
1294+ vcat (X... ) = cat (Val ( 1 ) , X... )
12951295"""
12961296 hcat(A...)
12971297
@@ -1332,28 +1332,28 @@ julia> hcat(c...)
13321332 3 6
13331333```
13341334"""
1335- hcat (X... ) = cat (Val{ 2 } , X... )
1335+ hcat (X... ) = cat (Val ( 2 ) , X... )
13361336
1337- typed_vcat (T:: Type , X... ) = cat_t (Val{ 1 } , T, X... )
1338- typed_hcat (T:: Type , X... ) = cat_t (Val{ 2 } , T, X... )
1337+ typed_vcat (T:: Type , X... ) = cat_t (Val ( 1 ) , T, X... )
1338+ typed_hcat (T:: Type , X... ) = cat_t (Val ( 2 ) , T, X... )
13391339
13401340cat (catdims, A:: AbstractArray{T} ...) where {T} = cat_t (catdims, T, A... )
13411341
13421342# The specializations for 1 and 2 inputs are important
13431343# especially when running with --inline=no, see #11158
1344- vcat (A:: AbstractArray ) = cat (Val{ 1 } , A)
1345- vcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val{ 1 } , A, B)
1346- vcat (A:: AbstractArray... ) = cat (Val{ 1 } , A... )
1347- hcat (A:: AbstractArray ) = cat (Val{ 2 } , A)
1348- hcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val{ 2 } , A, B)
1349- hcat (A:: AbstractArray... ) = cat (Val{ 2 } , A... )
1350-
1351- typed_vcat (T:: Type , A:: AbstractArray ) = cat_t (Val{ 1 } , T, A)
1352- typed_vcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val{ 1 } , T, A, B)
1353- typed_vcat (T:: Type , A:: AbstractArray... ) = cat_t (Val{ 1 } , T, A... )
1354- typed_hcat (T:: Type , A:: AbstractArray ) = cat_t (Val{ 2 } , T, A)
1355- typed_hcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val{ 2 } , T, A, B)
1356- typed_hcat (T:: Type , A:: AbstractArray... ) = cat_t (Val{ 2 } , T, A... )
1344+ vcat (A:: AbstractArray ) = cat (Val ( 1 ) , A)
1345+ vcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val ( 1 ) , A, B)
1346+ vcat (A:: AbstractArray... ) = cat (Val ( 1 ) , A... )
1347+ hcat (A:: AbstractArray ) = cat (Val ( 2 ) , A)
1348+ hcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val ( 2 ) , A, B)
1349+ hcat (A:: AbstractArray... ) = cat (Val ( 2 ) , A... )
1350+
1351+ typed_vcat (T:: Type , A:: AbstractArray ) = cat_t (Val ( 1 ) , T, A)
1352+ typed_vcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val ( 1 ) , T, A, B)
1353+ typed_vcat (T:: Type , A:: AbstractArray... ) = cat_t (Val ( 1 ) , T, A... )
1354+ typed_hcat (T:: Type , A:: AbstractArray ) = cat_t (Val ( 2 ) , T, A)
1355+ typed_hcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val ( 2 ) , T, A, B)
1356+ typed_hcat (T:: Type , A:: AbstractArray... ) = cat_t (Val ( 2 ) , T, A... )
13571357
13581358# 2d horizontal and vertical concatenation
13591359
@@ -1722,7 +1722,7 @@ _sub2ind_vec(i) = ()
17221722
17231723function ind2sub (inds:: Union{DimsInteger{N},Indices{N}} , ind:: AbstractVector{<:Integer} ) where N
17241724 M = length (ind)
1725- t = ntuple (n-> similar (ind),Val{N} )
1725+ t = ntuple (n-> similar (ind),Val (N) )
17261726 for (i,idx) in enumerate (IndexLinear (), ind)
17271727 sub = ind2sub (inds, idx)
17281728 for j = 1 : N
0 commit comments