We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Base.literal_pow should be overloaded so that Q^2 works, i.e., we want the following to not error:
Base.literal_pow
Q^2
julia> Q = qr(randn(5,5)).Q 5×5 LinearAlgebra.QRCompactWYQ{Float64, Matrix{Float64}, Matrix{Float64}} julia> Q*Q 5×5 Matrix{Float64}: -0.908458 0.15328 0.171023 0.346546 0.0431982 -0.0574299 0.850477 -0.260641 -0.419498 0.171693 0.0887003 0.307879 0.330109 0.0439806 -0.886813 0.381531 0.369071 0.5402 0.521318 0.393233 0.134058 0.148969 -0.70854 0.655912 -0.166092 julia> Q^2 ERROR: MethodError: no method matching ^(::LinearAlgebra.QRCompactWYQ{Float64, Matrix{Float64}, Matrix{Float64}}, ::Int64) Closest candidates are: ^(::Regex, ::Integer) @ Base regex.jl:863 ^(::Missing, ::Integer) @ Base missing.jl:165 ^(::Missing, ::Number) @ Base missing.jl:123 ... Stacktrace: [1] literal_pow(f::typeof(^), x::LinearAlgebra.QRCompactWYQ{Float64, Matrix{Float64}, Matrix{Float64}}, ::Val{2}) @ Base ./intfuncs.jl:351 [2] top-level scope @ REPL[177]:1
The text was updated successfully, but these errors were encountered:
AbstractQ
Successfully merging a pull request may close this issue.
Base.literal_pow
should be overloaded so thatQ^2
works, i.e., we want the following to not error:The text was updated successfully, but these errors were encountered: