-
-
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
QR factorization does not show Q factor #49635
Comments
This was also changed in #46196 on purpose. |
Can this be closed? |
I think we shouldn't care too much about cost when printing / showing a struct. |
I've looked into it. It's a pretty big deal, after all. We have some matrix printing code that does all computations regarding alignment of elements, fill-up with ellipses etc. That's specialized to |
Is there a different way to show it, perhaps by summarising the struct fields? The current display might confuse users who might expect some value to be printed after the type |
Why not just print |
Given that |
Of course. You'd allocate an entirely new matrix in memory.
No, for big Q's, you'd only want to print the "corners" of the "matrix". In that case, you better compute only those that are required for printing, instead of first computing everything and then use only the corners. That's what used to be done. Printing works via |
What if we change the output to julia> qr(randn(2,2))
LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}
Q factor: 2×2 LinearAlgebra.QRCompactWYQ{Float64, Matrix{Float64}, Matrix{Float64}}
R factor:
2×2 Matrix{Float64}:
-2.3358 -0.951623
0.0 -0.608775 ? Like remove the line break between "Q factor" and the summary of Q. If one really wants to inspect |
On current master, I get
The actual matrix should be printed after
Q factor:
.The text was updated successfully, but these errors were encountered: