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

address svds returning nans for zero input matrix #3719

Merged
merged 3 commits into from
Aug 23, 2014

Conversation

argriffing
Copy link
Contributor

fixes #3452 and passes sparse.linalg tests locally

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2357848 on argriffing:singular-svds-lm into * on scipy:master*.

@argriffing
Copy link
Contributor Author

This should be ready for review/merge.

# Gramian matrices have real non-negative eigenvalues.
eigvals = np.maximum(eigvals.real, 0)

# Copy the sophisticated detection of small eigenvalues from pinvh.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just write it out rather than copypaste?
The if statements and several of the assignments are redundant here...

@pv
Copy link
Member

pv commented Jun 14, 2014

The maths look OK to me. Minor comments otherwise above.

@argriffing
Copy link
Contributor Author

@pv Thanks for your comments, I've simplified the code accordingly.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling ba71000 on argriffing:singular-svds-lm into * on scipy:master*.

@pv pv removed the PR label Aug 13, 2014
pv added a commit that referenced this pull request Aug 23, 2014
BUG: sparse.linalg: address svds returning nans for zero input matrix
@pv pv merged commit 24c2484 into scipy:master Aug 23, 2014
@pv
Copy link
Member

pv commented Aug 23, 2014

Thanks, merged.

@pv pv added this to the 0.15.0 milestone Aug 23, 2014
@ilayn ilayn mentioned this pull request Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

svds returning nans for zero input matrix
5 participants