@@ -28,7 +28,7 @@ julia> size(A,3,2)
2828"""
2929size (t:: AbstractArray{T,N} , d) where {T,N} = d <= N ? size (t)[d] : 1
3030size (x, d1:: Integer , d2:: Integer , dx:: Vararg{Integer, N} ) where {N} =
31- (size (x, d1), size (x, d2), ntuple (k-> size (x, dx[k]), Val{N} )... )
31+ (size (x, d1), size (x, d2), ntuple (k-> size (x, dx[k]), Val (N) )... )
3232
3333"""
3434 indices(A, d)
@@ -954,13 +954,13 @@ function _getindex(::IndexCartesian, A::AbstractArray{T,N}, I::Vararg{Int, N}) w
954954 getindex (A, I... )
955955end
956956_to_subscript_indices (A:: AbstractArray , i:: Int ) = (@_inline_meta ; _unsafe_ind2sub (A, i))
957- _to_subscript_indices (A:: AbstractArray{T,N} ) where {T,N} = (@_inline_meta ; fill_to_length ((), 1 , Val{N} )) # TODO : DEPRECATE FOR #14770
957+ _to_subscript_indices (A:: AbstractArray{T,N} ) where {T,N} = (@_inline_meta ; fill_to_length ((), 1 , Val (N) )) # TODO : DEPRECATE FOR #14770
958958_to_subscript_indices (A:: AbstractArray{T,0} ) where {T} = () # TODO : REMOVE FOR #14770
959959_to_subscript_indices (A:: AbstractArray{T,0} , i:: Int ) where {T} = () # TODO : REMOVE FOR #14770
960960_to_subscript_indices (A:: AbstractArray{T,0} , I:: Int... ) where {T} = () # TODO : DEPRECATE FOR #14770
961961function _to_subscript_indices (A:: AbstractArray{T,N} , I:: Int... ) where {T,N} # TODO : DEPRECATE FOR #14770
962962 @_inline_meta
963- J, Jrem = IteratorsMD. split (I, Val{N} )
963+ J, Jrem = IteratorsMD. split (I, Val (N) )
964964 _to_subscript_indices (A, J, Jrem)
965965end
966966_to_subscript_indices (A:: AbstractArray , J:: Tuple , Jrem:: Tuple{} ) =
@@ -1203,7 +1203,7 @@ cat_shape(dims, shape::Tuple) = shape
12031203
12041204_cshp (ndim:: Int , :: Tuple{} , :: Tuple{} , :: Tuple{} ) = ()
12051205_cshp (ndim:: Int , :: Tuple{} , :: Tuple{} , nshape) = nshape
1206- _cshp (ndim:: Int , dims, :: Tuple{} , :: Tuple{} ) = ntuple (b -> 1 , Val{ length (dims)} )
1206+ _cshp (ndim:: Int , dims, :: Tuple{} , :: Tuple{} ) = ntuple (b -> 1 , Val ( length (dims)) )
12071207@inline _cshp (ndim:: Int , dims, shape, :: Tuple{} ) =
12081208 (shape[1 ] + dims[1 ], _cshp (ndim + 1 , tail (dims), tail (shape), ())... )
12091209@inline _cshp (ndim:: Int , dims, :: Tuple{} , nshape) =
@@ -1226,7 +1226,7 @@ end
12261226_cs (d, a, b) = (a == b ? a : throw (DimensionMismatch (
12271227 " mismatch in dimension $d (expected $a got $b )" )))
12281228
1229- dims2cat (:: Type{ Val{n}} ) where {n} = ntuple (i -> (i == n), Val{n} )
1229+ dims2cat (:: Val{n} ) where {n} = ntuple (i -> (i == n), Val (n) )
12301230dims2cat (dims) = ntuple (i -> (i in dims), maximum (dims))
12311231
12321232cat (dims, X... ) = cat_t (dims, promote_eltypeof (X... ), X... )
@@ -1290,7 +1290,7 @@ julia> vcat(c...)
12901290 4 5 6
12911291```
12921292"""
1293- vcat (X... ) = cat (Val{ 1 } , X... )
1293+ vcat (X... ) = cat (Val ( 1 ) , X... )
12941294"""
12951295 hcat(A...)
12961296
@@ -1331,28 +1331,28 @@ julia> hcat(c...)
13311331 3 6
13321332```
13331333"""
1334- hcat (X... ) = cat (Val{ 2 } , X... )
1334+ hcat (X... ) = cat (Val ( 2 ) , X... )
13351335
1336- typed_vcat (T:: Type , X... ) = cat_t (Val{ 1 } , T, X... )
1337- typed_hcat (T:: Type , X... ) = cat_t (Val{ 2 } , T, X... )
1336+ typed_vcat (T:: Type , X... ) = cat_t (Val ( 1 ) , T, X... )
1337+ typed_hcat (T:: Type , X... ) = cat_t (Val ( 2 ) , T, X... )
13381338
13391339cat (catdims, A:: AbstractArray{T} ...) where {T} = cat_t (catdims, T, A... )
13401340
13411341# The specializations for 1 and 2 inputs are important
13421342# especially when running with --inline=no, see #11158
1343- vcat (A:: AbstractArray ) = cat (Val{ 1 } , A)
1344- vcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val{ 1 } , A, B)
1345- vcat (A:: AbstractArray... ) = cat (Val{ 1 } , A... )
1346- hcat (A:: AbstractArray ) = cat (Val{ 2 } , A)
1347- hcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val{ 2 } , A, B)
1348- hcat (A:: AbstractArray... ) = cat (Val{ 2 } , A... )
1349-
1350- typed_vcat (T:: Type , A:: AbstractArray ) = cat_t (Val{ 1 } , T, A)
1351- typed_vcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val{ 1 } , T, A, B)
1352- typed_vcat (T:: Type , A:: AbstractArray... ) = cat_t (Val{ 1 } , T, A... )
1353- typed_hcat (T:: Type , A:: AbstractArray ) = cat_t (Val{ 2 } , T, A)
1354- typed_hcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val{ 2 } , T, A, B)
1355- typed_hcat (T:: Type , A:: AbstractArray... ) = cat_t (Val{ 2 } , T, A... )
1343+ vcat (A:: AbstractArray ) = cat (Val ( 1 ) , A)
1344+ vcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val ( 1 ) , A, B)
1345+ vcat (A:: AbstractArray... ) = cat (Val ( 1 ) , A... )
1346+ hcat (A:: AbstractArray ) = cat (Val ( 2 ) , A)
1347+ hcat (A:: AbstractArray , B:: AbstractArray ) = cat (Val ( 2 ) , A, B)
1348+ hcat (A:: AbstractArray... ) = cat (Val ( 2 ) , A... )
1349+
1350+ typed_vcat (T:: Type , A:: AbstractArray ) = cat_t (Val ( 1 ) , T, A)
1351+ typed_vcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val ( 1 ) , T, A, B)
1352+ typed_vcat (T:: Type , A:: AbstractArray... ) = cat_t (Val ( 1 ) , T, A... )
1353+ typed_hcat (T:: Type , A:: AbstractArray ) = cat_t (Val ( 2 ) , T, A)
1354+ typed_hcat (T:: Type , A:: AbstractArray , B:: AbstractArray ) = cat_t (Val ( 2 ) , T, A, B)
1355+ typed_hcat (T:: Type , A:: AbstractArray... ) = cat_t (Val ( 2 ) , T, A... )
13561356
13571357# 2d horizontal and vertical concatenation
13581358
@@ -1721,7 +1721,7 @@ _sub2ind_vec(i) = ()
17211721
17221722function ind2sub (inds:: Union{DimsInteger{N},Indices{N}} , ind:: AbstractVector{<:Integer} ) where N
17231723 M = length (ind)
1724- t = ntuple (n-> similar (ind),Val{N} )
1724+ t = ntuple (n-> similar (ind),Val (N) )
17251725 for (i,idx) in enumerate (IndexLinear (), ind)
17261726 sub = ind2sub (inds, idx)
17271727 for j = 1 : N
0 commit comments