@@ -2248,6 +2248,67 @@ finalizer(f::Ptr{Cvoid}, o::Function) = invoke(finalizer, Tuple{Ptr{Cvoid}, Any}
2248
2248
Base. @deprecate_binding broadcast_t broadcast false " , broadcast_t(f, ::Type{ElType}, shape, iter, As...)` should become `broadcast(f, Broadcast.DefaultArrayStyle{N}(), ElType, shape, As...))` (see the manual chapter Interfaces)"
2249
2249
end
2250
2250
2251
+
2252
+ # ## deprecations for lazier, less jazzy linalg transition in the next several blocks ###
2253
+
2254
+ # deprecate ConjArray
2255
+ # TODO : between 0.7 and 1.0 remove
2256
+ # 1) the type definitions in base/linalg/conjarray.jl
2257
+ # 2) the include("base/linalg/conjarray.jl") from base/linalg/linalg.jl
2258
+ # 3) the file base/linalg/conjarray.jl itself
2259
+ @eval Base. LinAlg begin
2260
+ export ConjArray, ConjVector, ConjMatrix
2261
+
2262
+ function ConjArray (a:: AbstractArray{T,N} ) where {T,N}
2263
+ Base. depwarn (_ConjArray_depstring (), :ConjArray )
2264
+ return ConjArray {conj_type(T),N,typeof(a)} (a)
2265
+ end
2266
+ function ConjVector (v:: AbstractVector{T} ) where {T}
2267
+ Base. depwarn (_ConjArray_depstring (), :ConjArray )
2268
+ return ConjArray {conj_type(T),1,typeof(v)} (v)
2269
+ end
2270
+ function ConjMatrix (m:: AbstractMatrix{T} ) where {T}
2271
+ Base. depwarn (_ConjArray_depstring (), :ConjArray )
2272
+ return ConjArray {conj_type(T),2,typeof(m)} (m)
2273
+ end
2274
+
2275
+ _ConjArray_depstring () = string (" `ConjRowVector` and `RowVector` have been deprecated in favor " ,
2276
+ " of `Adjoint` and `Transpose`, and, as part of the implementation of `ConjRowVector`" ,
2277
+ " /`RowVector`, `ConjArray`s have been deprecated as well. Please see 0.7's NEWS.md " ,
2278
+ " for a more detailed explanation of the associated changes." )
2279
+
2280
+ # This type can cause the element type to change under conjugation - e.g. an array of complex arrays.
2281
+ @inline conj_type (x) = conj_type (typeof (x))
2282
+ @inline conj_type (:: Type{T} ) where {T} = promote_op (conj, T)
2283
+
2284
+ @inline parent (c:: ConjArray ) = c. parent
2285
+ @inline parent_type (c:: ConjArray ) = parent_type (typeof (c))
2286
+ @inline parent_type (:: Type{ConjArray{T,N,A}} ) where {T,N,A} = A
2287
+
2288
+ @inline size (a:: ConjArray ) = size (a. parent)
2289
+ IndexStyle (:: CA ) where {CA<: ConjArray } = IndexStyle (parent_type (CA))
2290
+ IndexStyle (:: Type{CA} ) where {CA<: ConjArray } = IndexStyle (parent_type (CA))
2291
+
2292
+ @propagate_inbounds getindex (a:: ConjArray{T,N} , i:: Int ) where {T,N} = conj (getindex (a. parent, i))
2293
+ @propagate_inbounds getindex (a:: ConjArray{T,N} , i:: Vararg{Int,N} ) where {T,N} = conj (getindex (a. parent, i... ))
2294
+ @propagate_inbounds setindex! (a:: ConjArray{T,N} , v, i:: Int ) where {T,N} = setindex! (a. parent, conj (v), i)
2295
+ @propagate_inbounds setindex! (a:: ConjArray{T,N} , v, i:: Vararg{Int,N} ) where {T,N} = setindex! (a. parent, conj (v), i... )
2296
+
2297
+ @inline similar (a:: ConjArray , :: Type{T} , dims:: Dims{N} ) where {T,N} = similar (parent (a), T, dims)
2298
+
2299
+ # Currently, this is default behavior for RowVector only
2300
+ @inline conj (a:: ConjArray ) = parent (a)
2301
+
2302
+ # Helper functions, currently used by RowVector
2303
+ @inline _conj (a:: AbstractArray ) = ConjArray (a)
2304
+ @inline _conj (a:: AbstractArray{T} ) where {T<: Real } = a
2305
+ @inline _conj (a:: ConjArray ) = parent (a)
2306
+ @inline _conj (a:: ConjArray{T} ) where {T<: Real } = parent (a)
2307
+ end
2308
+ @eval Base begin
2309
+ export ConjArray
2310
+ end
2311
+
2251
2312
# A[ct]_(mul|ldiv|rdiv)_B[ct][!] methods from base/operators.jl, to deprecate
2252
2313
@deprecate Ac_ldiv_Bt (a,b) (\ )(Adjoint (a), Transpose (b))
2253
2314
@deprecate At_ldiv_Bt (a,b) (\ )(Transpose (a), Transpose (b))
0 commit comments