-
Notifications
You must be signed in to change notification settings - Fork 53
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
lu(A::AbstractMatrix{Taylor1{T}})
method not properly inferred in Julia v1.8
#295
Comments
A way to solve this is by extending the method to the signature Still I don't understand why the method is not inferred at once.... |
Or simply replacing |
Hmm, I'm not sure what changed in v1.8, but indeed there is a potential for ambiguities when defining I don't think this is an inference issue, it seems like a genuine ambiguity problem (which may have invisibly existed before v1.8). @dkarrasch I did not think this through, but would it be an idea to add an indirection in LinearAlgebra? Something like |
On master we have JuliaLang/julia#40831 included, but not in v1.7.x. Couldn't we remove the |
I'm working on mildly cleaning up JuliaLang/julia#40831, so we should continue to discuss there. I hope we can find solutions that would prevent the need for downstream fixes. |
Of course, that's it. I mistakenly thought that went into 1.7. |
Thanks a lot for looking up this @dkarrasch @daanhb! As proposed, the discussion will follow in JuliaLang/julia#43700.
Just to answer @daanhb's comment, you are right, using #296 for a julia> a = Symmetric(rand(3,3));
julia> b = Symmetric(Taylor1.(a, 5))
3×3 Symmetric{Taylor1{Float64}, Matrix{Taylor1{Float64}}}:
0.19349955324833334 + 𝒪(t⁶) … 0.3400375943006272 + 𝒪(t⁶)
0.47521570481828634 + 𝒪(t⁶) 0.5766819299947761 + 𝒪(t⁶)
0.3400375943006272 + 𝒪(t⁶) 0.07220722813704294 + 𝒪(t⁶)
julia> @which lu(b)
lu(A::AbstractMatrix{T}) where T in LinearAlgebra at /usr/local/julia/julia-1.7.1/share/julia/stdlib/v1.7/LinearAlgebra/src/lu.jl:277 |
The symmetric case should be taken care of by @daanhb' proposal which is now also part of JuliaLang/julia#43700. |
Fixed by JuliaLang/julia#43700. |
lu(A::AbstractMatrix{Taylor1{T}})
method here is not properly inferred in Julia v1.8 (currently nightly), which is the reason for this error in the tests. (The error is silent due to this line.)The following illustrates the problem:
For comparison, in Julia v1.7.1, the last line yields
Refs: #281, #284, and older #221, #223
@dkarrasch @daanhb Maybe you have a suggestion for this...
The text was updated successfully, but these errors were encountered: