@@ -223,8 +223,8 @@ for f in diadic
223223 f === NaNMath. pow && continue
224224 @eval function promote_shape (:: $ (typeof (f)), sh1:: ShapeT , sh2:: ShapeT )
225225 @nospecialize sh1 sh2
226- _is_array_shape (sh1) && _throw_array ($ f, sh1, sh2)
227- _is_array_shape (sh2) && _throw_array ($ f, sh1, sh2)
226+ is_array_shape (sh1) && _throw_array ($ f, sh1, sh2)
227+ is_array_shape (sh2) && _throw_array ($ f, sh1, sh2)
228228 return ShapeVecT ()
229229 end
230230end
@@ -246,7 +246,7 @@ for f in monadic
246246 else
247247 @eval function promote_shape (:: $ (typeof (f)), sh:: ShapeT )
248248 @nospecialize sh
249- _is_array_shape (sh) && _throw_array ($ f, sh)
249+ is_array_shape (sh) && _throw_array ($ f, sh)
250250 return ShapeVecT ()
251251 end
252252 end
255255error_f_symbolic (f, T) = error (" $f is not defined for $T ." )
256256
257257function promote_shape (:: typeof (rem2pi), sha:: ShapeT , shb:: ShapeT )
258- _is_array_shape (sha) && _throw_array (rem2pi, sha, shb)
258+ is_array_shape (sha) && _throw_array (rem2pi, sha, shb)
259259 ShapeVecT ()
260260end
261261function Base. rem2pi (x:: BasicSymbolic{T} , mode:: Base.RoundingMode ) where {T}
287287function Base. inv (x:: BasicSymbolic{T} ) where {T}
288288 sh = shape (x)
289289 type = promote_symtype (inv, symtype (x))
290- if _is_array_shape (sh)
290+ if is_array_shape (sh)
291291 return Term {T} (inv, ArgsT {T} ((x,)); type = type, shape = sh)
292292 else
293293 return x ^ (- 1 )
@@ -381,7 +381,7 @@ function Base.adjoint(s::BasicSymbolic{T}) where {T}
381381 end
382382 sh = shape (s)
383383 stype = symtype (s)
384- if _is_array_shape (sh)
384+ if is_array_shape (sh)
385385 type = promote_symtype (adjoint, stype)
386386 newsh = promote_shape (adjoint, sh)
387387 return Term {T} (adjoint, ArgsT {T} ((s,)); type, shape = newsh)
@@ -493,7 +493,7 @@ function _ndims_from_shape(sh::ShapeT)
493493 end
494494end
495495Base. ndims (x:: BasicSymbolic ) = _ndims_from_shape (shape (x))
496- Base. broadcastable (x:: BasicSymbolic ) = _is_array_shape (shape (x)) ? x : Ref (x)
496+ Base. broadcastable (x:: BasicSymbolic ) = is_array_shape (shape (x)) ? x : Ref (x)
497497function Base. eachindex (x:: BasicSymbolic )
498498 sh = shape (x)
499499 if sh isa Unknown
@@ -506,7 +506,7 @@ function Base.collect(x::BasicSymbolic)
506506end
507507function Base. iterate (x:: BasicSymbolic )
508508 sh = shape (x)
509- _is_array_shape (sh) || return x, nothing
509+ is_array_shape (sh) || return x, nothing
510510 idxs = eachindex (x)
511511 idx, state = iterate (idxs)
512512 return x[idx], (idxs, state)
@@ -530,12 +530,12 @@ promote_symtype(::Type{CartesianIndex}, xs...) = CartesianIndex{length(xs)}
530530promote_symtype (:: Type{CartesianIndex{N}} , xs:: Vararg{T, N} ) where {T, N} = CartesianIndex{N}
531531function promote_shape (:: Type{CartesianIndex} , xs:: ShapeT... )
532532 @nospecialize xs
533- @assert all (! _is_array_shape , xs)
533+ @assert all (! is_array_shape , xs)
534534 return ShapeVecT ((1 : length (xs),))
535535end
536536function promote_shape (:: Type{CartesianIndex{N}} , xs:: Vararg{ShapeT, N} ) where {N}
537537 @nospecialize xs
538- @assert all (! _is_array_shape , xs)
538+ @assert all (! is_array_shape , xs)
539539 return ShapeVecT ((1 : length (xs),))
540540end
541541function Base. CartesianIndex (x:: BasicSymbolic{T} , xs:: BasicSymbolic{T} ...) where {T}
@@ -690,7 +690,7 @@ function _copy_broadcast!(buffer::BroadcastBuffer{T}, bc::Broadcast.Broadcasted{
690690
691691 for arg in canonical_args
692692 sh = shape (arg)
693- is_arr = _is_array_shape (sh)
693+ is_arr = is_array_shape (sh)
694694 if ! is_arr
695695 push! (args, arg)
696696 continue
@@ -757,7 +757,7 @@ promote_symtype(::typeof(LinearAlgebra.dot), ::Type{T}, ::Type{S}) where {eT, T
757757
758758function LinearAlgebra. dot (x:: BasicSymbolic{T} , y:: BasicSymbolic{T} ) where {T}
759759 shx = shape (x)
760- if _is_array_shape (shx)
760+ if is_array_shape (shx)
761761 sh = promote_shape (LinearAlgebra. dot, shx, shape (y))
762762 type = promote_symtype (LinearAlgebra. dot, symtype (x), symtype (y))
763763 BSImpl. Term {T} (LinearAlgebra. dot, ArgsT {T} ((x, y)); type, shape = sh)
@@ -994,7 +994,7 @@ function promote_symtype(::typeof(in), ::Type{T}, ::Type{S}) where {T, S}
994994end
995995function promote_shape (:: typeof (in), sha:: ShapeT , shb:: ShapeT )
996996 @nospecialize sha shb
997- @assert _is_array_shape (shb) || throw (ArgumentError (" Symbolic `in` requires an array as the second argument." ))
997+ @assert is_array_shape (shb) || throw (ArgumentError (" Symbolic `in` requires an array as the second argument." ))
998998 return ShapeVecT ()
999999end
10001000
@@ -1013,8 +1013,8 @@ function promote_symtype(::typeof(issubset), ::Type{T}, ::Type{S}) where {T <: A
10131013end
10141014function promote_shape (:: typeof (issubset), sha:: ShapeT , shb:: ShapeT )
10151015 @nospecialize sha shb
1016- @assert _is_array_shape (sha) || throw (ArgumentError (" Symbolic `issubset` requires arrays as both arguments." ))
1017- @assert _is_array_shape (shb) || throw (ArgumentError (" Symbolic `issubset` requires arrays as both arguments." ))
1016+ @assert is_array_shape (sha) || throw (ArgumentError (" Symbolic `issubset` requires arrays as both arguments." ))
1017+ @assert is_array_shape (shb) || throw (ArgumentError (" Symbolic `issubset` requires arrays as both arguments." ))
10181018 return ShapeVecT ()
10191019end
10201020
@@ -1036,8 +1036,8 @@ for f in [union, intersect]
10361036 end
10371037 @eval function promote_shape (:: $ (typeof (f)), sha:: ShapeT , shb:: ShapeT )
10381038 @nospecialize sha shb
1039- @assert _is_array_shape (sha) || throw (ArgumentError (" Symbolic `$($ f) ` requires arrays as both arguments." ))
1040- @assert _is_array_shape (shb) || throw (ArgumentError (" Symbolic `$($ f) ` requires arrays as both arguments." ))
1039+ @assert is_array_shape (sha) || throw (ArgumentError (" Symbolic `$($ f) ` requires arrays as both arguments." ))
1040+ @assert is_array_shape (shb) || throw (ArgumentError (" Symbolic `$($ f) ` requires arrays as both arguments." ))
10411041 return Unknown (1 )
10421042 end
10431043 for T1 in [AbstractArray, :(BasicSymbolic{T})], T2 in [AbstractArray, :(BasicSymbolic{T})]
@@ -1064,8 +1064,8 @@ function promote_symtype(::typeof(binomial), ::Type{T}, ::Type{S}) where {T <: N
10641064end
10651065function promote_shape (:: typeof (binomial), sha:: ShapeT , shb:: ShapeT )
10661066 @nospecialize sha shb
1067- _is_array_shape (sha) && _throw_array (sha)
1068- _is_array_shape (shb) && _throw_array (shb)
1067+ is_array_shape (sha) && _throw_array (sha)
1068+ is_array_shape (shb) && _throw_array (shb)
10691069
10701070 return ShapeVecT ()
10711071end
0 commit comments