-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
ENH: Add the linalg extension to the array_api submodule #19980
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
Merged
Merged
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
4b34571
Add functions from the linear algebra array API extension
asmeurer 494d0e8
Move linear algebra named tuples to the linalg file to avoid circular…
asmeurer 7e2ceb1
Fix discrepancies between the NumPy cross() and the array API cross()
asmeurer 256f3da
Fix some bugs in the array API linear algebra module
asmeurer c9357a7
Fix some more bugs in the array API linear algebra module
asmeurer a6d2402
Merge branch 'array-api-updates1' into array-api-linalg
asmeurer c7be50f
Update the array_api linalg extension code for changes to the array_a…
asmeurer 9a9240d
Fix Array class rename in the array API linear algebra extension
asmeurer e60c40a
Remove references to eig and eigvals in the array API submodule
asmeurer 5c27cfe
Remove a todo item from the numpy/_array_api/__init__.py docstring
asmeurer 021c81b
Remove numpy/array_api/_linear_algebra_functions.py
asmeurer 03c2e5e
Fix the mT attribute in the array_api extension
asmeurer b29b03b
Use mT in the array_api cholesky
asmeurer 3b355a7
Update the array API linalg extension signatures
asmeurer 2e26f56
Update the array_api linalg extension namedtuple names
asmeurer 100b355
Fix the signature for the array API vector_norm
asmeurer 17f7b96
Fix the implementation of the array API matrix_norm() and vector_norm()
asmeurer edcb209
Fix the logic in vector_norm()
asmeurer b099684
Use CamelCase for the array_api linalg namedtuple classes
asmeurer ee49a7c
Add notes for array API linalg functions that aren't in np.linalg
asmeurer 89dbcb3
Fix the array API diagonal and trace implementations
asmeurer 2b41f91
Small fixes to numpy.array_api.linalg docstrings
asmeurer 3da93d5
Update numpy.array_api.linalg.vecdot to not accept axis=None
asmeurer 608c4bc
Remove the axis argument from numpy.array_api.matrix_norm
asmeurer dfcccbe
Make numpy.array_api.linalg.solve only allow stacks of matrices
asmeurer f13b22d
Update Literal types to not use floating-point literals
asmeurer 939eeb3
Update the field names for the array API qr() and svd() namedtuples
asmeurer 7375556
Merge remote-tracking branch 'upstream/main' into array-api-linalg
rgommers 5e31552
MAINT: add `array_api.linalg` to public API test
rgommers 07dbb8c
MAINT: address all remaining review comments
rgommers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this was discussed in NumPy before (including the potential
.Tlimitation!), time to revive that discussion!? I find it mildly annoying that we do these things in the new namespace, but seem avers to discussing it for NumPy proper. If we can get away with doing these things in NumPy it would be the best way to move code towards the better standard!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new APIs for matrix transpose were chosen so that they can be as backwards compatible as possible with libraries like NumPy that already use .T for reversing the axes. See data-apis/array-api#228 and the corresponding PRs.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I think so.
I don't think we are, it's just that no one followed up/through on making
matrix_transposepublic, and the discussion was framed around a big backcompat break in.T, which did not help. I think no one would object to making the privatematrix_transposepublic (EDIT: and then add.mT), it just needs doing?agreed