-
-
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
Tests for powm error #35101
Tests for powm error #35101
Conversation
Wow, this is an amazing example of what testing is good for. The tests currently fail because
powm(A::LowerTriangular, p::Real) = copy(transpose(powm!(copy(transpose(A)), p::Real))) because otherwise it throws saying there's no method matching @kshyatt Would you be willing to expand this PR to a "bugfix" one, or do you prefer to to do that elsewhere? |
I'll expand it. Shows what you get when you let CI run the tests for you.
… On Mar 13, 2020, at 1:52 PM, Daniel Karrasch ***@***.***> wrote:
Wow, this is an amazing example of what testing is good for. The tests currently fail because powm[!] is not exported. BUT, adding a LinearAlgebra specifier still keeps both tests failing, because
https://github.com/JuliaLang/julia/blob/3935491dc5028f23587ca8df6d4e0de75cf50e53/stdlib/LinearAlgebra/src/triangular.jl#L2172 requires a throw before the ArgumentError, otherwise it simply doesn't throw at all;
https://github.com/JuliaLang/julia/blob/3935491dc5028f23587ca8df6d4e0de75cf50e53/stdlib/LinearAlgebra/src/triangular.jl#L2231 should be
powm(A::LowerTriangular, p::Real) = copy(transpose(powm!(copy(transpose(A)), p::Real)))
because otherwise it throws saying there's no method matching powm(::UpperTriangular{Complex{Float64},Array{Complex{Float64},2}}, ::Float64). Sure enough, we don't have such a method, only one with !.
@kshyatt Would you be willing to expand this PR to a "bugfix" one, or do you prefer to to do that elsewhere?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Co-authored-by: Daniel Karrasch <Daniel.Karrasch@gmx.de>
Co-authored-by: Daniel Karrasch <Daniel.Karrasch@gmx.de>
Co-authored-by: Daniel Karrasch <Daniel.Karrasch@gmx.de>
This little throw and the pass-through for
LowerTriangular
are not tested.