Open
Description
On Julia nightly, two examples of failures are:
julia> using NamedDims, LinearAlgebra
julia> nda = NamedDimsArray(rand(Int8,3,4), (:x, :y))
3×4 NamedDimsArray(::Matrix{Int8}, (:x, :y)):
→ y
↓ x -102 114 -104 66
-35 71 56 100
73 -119 -112 -1
julia> hcat(nda, nda)
ERROR: MethodError: hcat(::NamedDimsArray{(:x, :y), Int8, 2, Matrix{Int8}}, ::NamedDimsArray{(:x, :y), Int8, 2, Matrix{Int8}}) is ambiguous.
Candidates:
hcat(a::Union{NamedDimsArray{L, T, 1, A} where A<:AbstractVector{T}, NamedDimsArray{L, T, 2, A} where A<:AbstractMatrix{T}} where {L, T}, b::Union{NamedDimsArray{L, T, 1, A} where A<:AbstractVector{T}, NamedDimsArray{L, T, 2, A} where A<:AbstractMatrix{T}} where {L, T}, cs::AbstractVecOrMat...)
@ NamedDims ~/.julia/packages/NamedDims/pu9Bn/src/cat.jl:37
hcat(X::Union{Number, AbstractVecOrMat{<:Number}}...)
@ SparseArrays ~/.julia/dev/julia/usr/share/julia/stdlib/v1.11/SparseArrays/src/sparsevector.jl:1223
hcat(a::Union{NamedDimsArray{L, T, 1, A} where A<:AbstractVector{T}, NamedDimsArray{L, T, 2, A} where A<:AbstractMatrix{T}} where {L, T}, b::AbstractVecOrMat, cs::AbstractVecOrMat...)
@ NamedDims ~/.julia/packages/NamedDims/pu9Bn/src/cat.jl:37
hcat(a::AbstractVecOrMat, b::Union{NamedDimsArray{L, T, 1, A} where A<:AbstractVector{T}, NamedDimsArray{L, T, 2, A} where A<:AbstractMatrix{T}} where {L, T}, cs::AbstractVecOrMat...)
@ NamedDims ~/.julia/packages/NamedDims/pu9Bn/src/cat.jl:37
Possible fix, define
hcat(::Union{NamedDimsArray{L, var"#s186", 1, A} where {var"#s186"<:Number, L, A<:AbstractVector{var"#s186"}}, NamedDimsArray{L, var"#s186", 2, A} where {var"#s186"<:Number, L, A<:AbstractMatrix{var"#s186"}}}, ::Union{NamedDimsArray{L, var"#s186", 1, A} where {var"#s186"<:Number, L, A<:AbstractVector{var"#s186"}}, NamedDimsArray{L, var"#s186", 2, A} where {var"#s186"<:Number, L, A<:AbstractMatrix{var"#s186"}}}, ::Vararg{AbstractVecOrMat{<:Number}})
julia> qr(nda * nda').Q
ERROR: MethodError: no method matching (NamedDimsArray{(:x, :_)})(::LinearAlgebra.QRCompactWYQ{Float64, Matrix{Float64}, Matrix{Float64}})
Closest candidates are:
(NamedDimsArray{L})(::NamedWrapper{old_names, T, N, A}) where {L, old_names, T, N, A}
@ NamedDims ~/.julia/dev/NamedDims/src/wrapper_array.jl:70
(NamedDimsArray{L})(::NamedDimsArray{L}) where L
@ NamedDims ~/.julia/dev/NamedDims/src/wrapper_array.jl:69
(NamedDimsArray{L})(::AbstractArray{T, N}) where {L, T, N}
@ NamedDims ~/.julia/dev/NamedDims/src/wrapper_array.jl:51
Stacktrace:
[1] getproperty(fact::NamedDims.NamedFactorization{(:x, :x), Float64, LinearAlgebra.QRCompactWY{…}}, d::Symbol)
@ NamedDims ~/.julia/dev/NamedDims/src/functions_linearalgebra.jl:129
Tests on nightly seem not to be running: https://github.com/invenia/NamedDims.jl/actions/workflows/JuliaNightly.yml?query=workflow%3ACI
Metadata
Metadata
Assignees
Labels
No labels