You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems like LinearAlgebra.copyto_oftype should be extended for NamedDimsArray, deferring to LinearAlgebra.copyto_oftype for the underlying data. e.g. this seems to be sufficient (open issue mcabbott/AxisKeys.jl#133 for KeyedArray)
julia>function LinearAlgebra.copy_oftype(A::KeyedArray, ::Type{T}) where {T}
returnKeyedArray(LinearAlgebra.copy_oftype(A.data, T), axiskeys(A))
end
julia>function LinearAlgebra.copy_oftype(A::NamedDimsArray, ::Type{T}) where {T}
returnNamedDimsArray(LinearAlgebra.copy_oftype(A.data, T); named_axiskeys(A)...)
end
julia> K + I
2-dimensional NamedDimsArray(KeyedArray(...)) with keys:↓ rows ∈2-element Vector{Symbol}
→ cols ∈2-element Vector{Symbol}
And data, 2×2 Symmetric{Float64, Matrix{Float64}}:
(:c) (:d)
(:a) 1.993230.122844
(:b) 0.1228441.69735
The text was updated successfully, but these errors were encountered:
mjp98
changed the title
Error in LinearAlgebra.copy_oftype on addition of symmetric NamedDimsArray and UniformScaling
Error in addition of symmetric NamedDimsArray and UniformScalingNov 16, 2022
In Julia 1.8.2
It seems like
LinearAlgebra.copyto_oftype
should be extended forNamedDimsArray
, deferring toLinearAlgebra.copyto_oftype
for the underlying data. e.g. this seems to be sufficient (open issue mcabbott/AxisKeys.jl#133 forKeyedArray
)The text was updated successfully, but these errors were encountered: