Repository navigation
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 9 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
mrava87
marked this pull request as ready for review
October 11, 2026 17:44
cako
reviewed
Oct 14, 2026
Comment on lines
+1073
to
+1077
| If ``backend="cupy"``, the eigenvalues of a square operator | ||
| can be computed only when in symmetric (``symmetric=True``), | ||
| since CuPy does not provide an equivalent | ||
| of :func:`scipy.sparse.linalg.eigs`. A | ||
| :obj:`NotImplementedError` is raised. |
Collaborator
There was a problem hiding this comment.
This would be a cool paper to implement to get this to work without quadratic memory required by Arnoldi: https://arxiv.org/abs/2407.03208
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for CuPy in
LinearOperator.eigsandLinearOperator.cond.However, since not all methods in scipy are not available in cupy (eg
scipy.sparse.linalg.eigs), and some input parameters are missing or have missing options (egSMincupyx.scipy.sparse.linalg.eigsh), a number of checks and error raises are required.Moreover, some cupyx eigenvalue solvers seem to require
self.ndimthat scipy/cupy.LinearOperator define asself.ndim = len(self.shape)(not that the equivalent scipy eigenvalue solvers don't... to accommodate for it, every operator that usedself.ndiminternally (eg FFT) is now modified to useself.ndimssoself.ndimcan be defined for the base class and made available to all operators.