diff options
author | Aaron Meurer <asmeurer@gmail.com> | 2022-12-12 18:23:04 -0700 |
---|---|---|
committer | Aaron Meurer <asmeurer@gmail.com> | 2022-12-12 18:23:04 -0700 |
commit | 18e88b4a89a4cbc59bbb00423c957537fa9cdb58 (patch) | |
tree | 142f5fb189ae06e46420ce9ee332edfba59baa29 /numpy/array_api/_creation_functions.py | |
parent | 4ca8204c5c13b3a5c9482772813e67184f3f47c8 (diff) | |
download | numpy-18e88b4a89a4cbc59bbb00423c957537fa9cdb58.tar.gz |
Add namedtuple return types to linalg functions that return tuples
That is, eig(), eigh(), qr(), slogdet(), and svd(). For those functions that
return non-tuples with certain keyword arguments, the return type is
unchanged. This change should be completely backwards compatible.
The namedtuple attribute names come from the array API specification (see,
e.g.,
https://data-apis.org/array-api/latest/extensions/generated/signatures.linalg.eigh.html),
with the exception of eig() which is just the same as eigh(). The name of the
namedtuple object itself is not part of the specification or the public API.
I have not used a namedtuple for the tuple output for qr(mode='raw'), which
returns (h, tau).
This updates the docstrings to use the updated namedtuple return names, and
also the examples to use those names more consistently. This also updates the
tests to check each function for the namedtuple attributes at least once.
Diffstat (limited to 'numpy/array_api/_creation_functions.py')
0 files changed, 0 insertions, 0 deletions