question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for eigvals keyword with eigh

See original GitHub issue

It would be great if eigh accepts eigvals= keyword like scipy.linalg.eigh.

Current, implementation attempts to compute all the eigenvectors. I only need its small subset; for example eigenvalues that correspond to a few hundred largest eigenvalues. The ranks of my matrices is about: 10,000 < r < 100,000.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leofangcommented, Jul 28, 2021

@kmaehashi I believe the original intention of this issue was to add eigvals to cupy.linalg.eigh. But there is already another API cupy.linalg.eigvalsh that only returns eigenvalues as requested. Also, this request is against the compatibility policy with NumPy APIs, so I don’t think it’s doable.

If the intention was to implement cupyx.scipy.linalg.eigh (which currently does not exist), then the issue title should be changed 🙂

0reactions
kmaehashicommented, Jul 28, 2021

Thanks, makes sense that cupy.linalg.eigvalsh can satisfy the requrement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

numpy.linalg.eigh — NumPy v1.24 Manual
Returns two objects, a 1-D array containing the eigenvalues of a, and a 2-D square array or matrix (depending on the input type)...
Read more >
jax.scipy.linalg.eigh - JAX documentation
5.0, use ``subset_by_index`` keyword instead. Indexes of the smallest and largest (in ascending order) eigenvalues and corresponding eigenvectors to be returned ...
Read more >
scipy.linalg.eigh — SciPy v1.9.3 Manual
Solve a standard or generalized eigenvalue problem for a complex Hermitian or real symmetric matrix. Find eigenvalues array w and optionally eigenvectors array ......
Read more >
Why is scipy's eigh returning unexpected negative eigenvalues?
I think not, considering that eigh returns both the eigenvalues and eigenvectors, whereas eigvals does something similar, but without returning ...
Read more >
torch.linalg.eigh — PyTorch 1.13 documentation
Also supports batches of matrices, and if A is a batch of matrices then the ... torch.linalg.eigvalsh() computes only the eigenvalues of a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found