- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 35
avoid division by zero in svd(::Diagonal) #1150
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -463,7 +463,8 @@ Random.seed!(1) | |
| end | ||
| end | ||
|  | ||
| @testset "svd (#11120/#11247)" begin | ||
| @testset "svd (#11120/#11247/#1149)" begin | ||
| D[1] = 0 | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this changing  d = [1, 2, 3, 4, 0]
@test svd(diagm(d)) == svd(Diagonal(d))? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Indeed, it is. That was intentional, as the subsequent test was also failing for singular matrices. I thought about doing that when  I don't have anything to do with issue, though, I just randomly found it and decided to fix it because it was so easy. | ||
| U, s, V = svd(D) | ||
| @test (U*Diagonal(s))*V' ≈ D | ||
| @test svdvals(D) == s | ||
|  | ||
Uh oh!
There was an error while loading. Please reload this page.