-
-
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
Fix bug in pinv
#45009
Fix bug in pinv
#45009
Conversation
stdlib/LinearAlgebra/test/pinv.jl
Outdated
for _ in 1:100 | ||
b = a*randn(n) | ||
x = apinv*b | ||
@test norm(a*x-b)/norm(b) ≈ 0 atol=tol1 | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the loop here? Is this intended or something left over from editing? Same below in lines 83-87.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since randn(n)
is included, I thought it would be better to verify multiple times rather than just one test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just one test should suffice. If we do this everywhere, the tests will take way too long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I have removed for _ in 1:100
.
I hope this PR will be backported to 1.6 and 1.7. |
Added the backport labels. Not sure if another 1.7 release will happen before 1.8 comes out. |
This PR fixes #44234.