@@ -792,7 +792,7 @@ function Math.frexp(A::Array{<:AbstractFloat})
792
792
" consider using dot-syntax to `broadcast` scalar `frexp` over `Array`s " ,
793
793
" instead, for example `frexp.(rand(4))`." ), :frexp )
794
794
F = similar (A)
795
- E = Array {Int} (size (A))
795
+ E = Array {Int} (uninitialized, size (A))
796
796
for (iF, iE, iA) in zip (eachindex (F), eachindex (E), eachindex (A))
797
797
F[iF], E[iE] = frexp (A[iA])
798
798
end
@@ -931,15 +931,15 @@ iteratoreltype(::Type{Task}) = EltypeUnknown()
931
931
isempty (:: Task ) = error (" isempty not defined for Tasks" )
932
932
933
933
# Deprecate Array(T, dims...) in favor of proper type constructors
934
- @deprecate Array (:: Type{T} , d:: NTuple{N,Int} ) where {T,N} Array {T} (d)
935
- @deprecate Array (:: Type{T} , d:: Int... ) where {T} Array {T} (d... )
936
- @deprecate Array (:: Type{T} , m:: Int ) where {T} Array {T} (m)
937
- @deprecate Array (:: Type{T} , m:: Int ,n:: Int ) where {T} Array {T} (m,n)
938
- @deprecate Array (:: Type{T} , m:: Int ,n:: Int ,o:: Int ) where {T} Array {T} (m,n,o)
939
- @deprecate Array (:: Type{T} , d:: Integer... ) where {T} Array {T} (convert (Tuple{Vararg{Int}}, d))
940
- @deprecate Array (:: Type{T} , m:: Integer ) where {T} Array {T} (Int (m))
941
- @deprecate Array (:: Type{T} , m:: Integer ,n:: Integer ) where {T} Array {T} (Int (m),Int (n))
942
- @deprecate Array (:: Type{T} , m:: Integer ,n:: Integer ,o:: Integer ) where {T} Array {T} (Int (m),Int (n),Int (o))
934
+ @deprecate Array (:: Type{T} , d:: NTuple{N,Int} ) where {T,N} Array {T} (uninitialized, d)
935
+ @deprecate Array (:: Type{T} , d:: Int... ) where {T} Array {T} (uninitialized, d... )
936
+ @deprecate Array (:: Type{T} , m:: Int ) where {T} Array {T} (uninitialized, m)
937
+ @deprecate Array (:: Type{T} , m:: Int ,n:: Int ) where {T} Array {T} (uninitialized, m,n)
938
+ @deprecate Array (:: Type{T} , m:: Int ,n:: Int ,o:: Int ) where {T} Array {T} (uninitialized, m,n,o)
939
+ @deprecate Array (:: Type{T} , d:: Integer... ) where {T} Array {T} (uninitialized, convert (Tuple{Vararg{Int}}, d))
940
+ @deprecate Array (:: Type{T} , m:: Integer ) where {T} Array {T} (uninitialized, Int (m))
941
+ @deprecate Array (:: Type{T} , m:: Integer ,n:: Integer ) where {T} Array {T} (uninitialized, Int (m),Int (n))
942
+ @deprecate Array (:: Type{T} , m:: Integer ,n:: Integer ,o:: Integer ) where {T} Array {T} (uninitialized, Int (m),Int (n),Int (o))
943
943
944
944
@noinline function is_intrinsic_expr (@nospecialize (x))
945
945
Base. depwarn (" is_intrinsic_expr is deprecated. There are no intrinsic functions anymore." , :is_intrinsic_expr )
@@ -1062,14 +1062,14 @@ end
1062
1062
# # end of FloatRange
1063
1063
1064
1064
@noinline zero_arg_matrix_constructor (prefix:: String ) =
1065
- depwarn (" $prefix () is deprecated, use $prefix (0, 0) instead." , :zero_arg_matrix_constructor )
1065
+ depwarn (" $prefix () is deprecated, use $prefix (uninitialized, 0, 0) instead." , :zero_arg_matrix_constructor )
1066
1066
function Matrix {T} () where T
1067
1067
zero_arg_matrix_constructor (" Matrix{T}" )
1068
- return Matrix {T} (0 , 0 )
1068
+ return Matrix {T} (uninitialized, 0 , 0 )
1069
1069
end
1070
1070
function Matrix ()
1071
1071
zero_arg_matrix_constructor (" Matrix" )
1072
- return Matrix (0 , 0 )
1072
+ return Matrix (uninitialized, 0 , 0 )
1073
1073
end
1074
1074
1075
1075
for name in (" alnum" , " alpha" , " cntrl" , " digit" , " number" , " graph" ,
@@ -1129,9 +1129,9 @@ import .LinAlg: cond
1129
1129
1130
1130
# PR #21359
1131
1131
import . Random: srand
1132
- @deprecate srand (r:: MersenneTwister , filename:: AbstractString , n:: Integer = 4 ) srand (r, read! (filename, Array {UInt32} (Int (n))))
1133
- @deprecate srand (filename:: AbstractString , n:: Integer = 4 ) srand (read! (filename, Array {UInt32} (Int (n))))
1134
- @deprecate MersenneTwister (filename:: AbstractString ) srand (MersenneTwister (0 ), read! (filename, Array {UInt32} (Int (4 ))))
1132
+ @deprecate srand (r:: MersenneTwister , filename:: AbstractString , n:: Integer = 4 ) srand (r, read! (filename, Vector {UInt32} (uninitialized, Int (n))))
1133
+ @deprecate srand (filename:: AbstractString , n:: Integer = 4 ) srand (read! (filename, Vector {UInt32} (uninitialized, Int (n))))
1134
+ @deprecate MersenneTwister (filename:: AbstractString ) srand (MersenneTwister (0 ), read! (filename, Vector {UInt32} (uninitialized, Int (4 ))))
1135
1135
1136
1136
# PR #21974
1137
1137
@deprecate versioninfo (verbose:: Bool ) versioninfo (verbose= verbose)
@@ -1343,9 +1343,9 @@ import .LinAlg: lufact, lufact!, qrfact, qrfact!, cholfact, cholfact!
1343
1343
1344
1344
@deprecate read (s:: IO , x:: Ref ) read! (s, x)
1345
1345
1346
- @deprecate read (s:: IO , t:: Type , d1:: Int , dims:: Int... ) read! (s, Array {t} (tuple (d1,dims... )))
1347
- @deprecate read (s:: IO , t:: Type , d1:: Integer , dims:: Integer... ) read! (s, Array {t} (convert (Tuple{Vararg{Int}},tuple (d1,dims... ))))
1348
- @deprecate read (s:: IO , t:: Type , dims:: Dims ) read! (s, Array {t} (dims))
1346
+ @deprecate read (s:: IO , t:: Type , d1:: Int , dims:: Int... ) read! (s, Array {t} (uninitialized, tuple (d1,dims... )))
1347
+ @deprecate read (s:: IO , t:: Type , d1:: Integer , dims:: Integer... ) read! (s, Array {t} (uninitialized, convert (Tuple{Vararg{Int}},tuple (d1,dims... ))))
1348
+ @deprecate read (s:: IO , t:: Type , dims:: Dims ) read! (s, Array {t} (uninitialized, dims))
1349
1349
1350
1350
function CartesianRange (start:: CartesianIndex{N} , stop:: CartesianIndex{N} ) where N
1351
1351
inds = map ((f,l)-> f: l, start. I, stop. I)
0 commit comments