Skip to content
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

Make SVD::solve return an Option insetad of panicking. #358

Closed
quadrupleslap opened this issue Jun 29, 2018 · 2 comments
Closed

Make SVD::solve return an Option insetad of panicking. #358

quadrupleslap opened this issue Jun 29, 2018 · 2 comments
Labels
breaking change Fixing this issue, or merging this pull-request is likely to require breaking changes good first issue Good first issue for newcomers. P-medium Medium priority

Comments

@quadrupleslap
Copy link

In svd.rs:

/// Returns None if the singular vectors U and V have not been computed.

But it panics, and it actually can't return None because it doesn't return an Option. I don't know whether the comment or the code needs to change.

@sebcrozet
Copy link
Member

While this is a breaking change, it is the code that should change to give the user a chance to handle the None case. That means .recompose() and .pseudo_inverse() should return None as well.

@sebcrozet sebcrozet changed the title False doc-comment for SVD::solve. Make SVD::solve return an Option insetad of panicking. Sep 4, 2018
@sebcrozet sebcrozet added good first issue Good first issue for newcomers. P-medium Medium priority breaking change Fixing this issue, or merging this pull-request is likely to require breaking changes labels Sep 4, 2018
@sebcrozet
Copy link
Member

Fixed by #441.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Fixing this issue, or merging this pull-request is likely to require breaking changes good first issue Good first issue for newcomers. P-medium Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants