-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New method ambiguity in 1.10: vcat on KeyedArrays #52386
Comments
Possibly duplicate of #52263. The offending method is added by |
Does adding the recommended method solve it? |
This should be re-opened on the SparseArrays repo, since the offending pirating method is added there. |
In case others find this issue and want a simple reliable workaround – here it is: Base.delete_method.(filter(
m -> nameof(m.module) == :SparseArrays && m.sig == Tuple{typeof(vcat), Union{Number,AbstractVecOrMat{<:Number}}, Vararg{Union{Number,AbstractVecOrMat{<:Number}}}},
methods(vcat)
))
Base.delete_method.(filter(
m -> nameof(m.module) == :SparseArrays && m.sig == Tuple{typeof(hcat), Union{Number,AbstractVecOrMat{<:Number}}, Vararg{Union{Number,AbstractVecOrMat{<:Number}}}},
methods(hcat)
)) Put this code into your script/code anywhere after package imports. It deletes those pirating methods defined in SparseArrays, getting rid of such ambiguities. At the same time, it doesn't interfere with |
When running some package tests on the upcoming (1.10rc) Julia version, I noticed a new error due to method ambiguity:
The
vcat
method list is quite long so it's hard to compare and tell – whether any new methods actually appeared in 1.10, or the ambiguity resolution algorithm changed.What I find weird in the message is that some of the candidates are clearly less specific than others. This makes me think that maybe there's some bug in the resolution?
If not and everything goes as expected, then what the solution should be? Are array types really expected to define
vcat(::MyArray{T}, ::MyArray{T}) where T<:Number
whenever they definevcat(::MyArray{T}, ::MyArray{T})
? Seems strange to single outNumber
here.The text was updated successfully, but these errors were encountered: