summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests
Commit message (Collapse)AuthorAgeFilesLines
* Add namedtuple return types to linalg functions that return tuplesAaron Meurer2022-12-121-26/+31
| | | | | | | | | | | | | | | | | | | 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.
* TST: Adapt test for modification to == and != deprecation/futurewarningSebastian Berg2022-12-011-4/+1
|
* TST: Skip tests that are not currently supported in wasmHood Chatham2022-11-111-1/+4
|
* API: Add leading underscore to `no_nep50_warning` and `get/set_promotion_state`Sebastian Berg2022-06-151-1/+1
|
* TST: Ignore promotion warning in linalg test calculating atolSebastian Berg2022-06-151-3/+3
|
* Merge pull request #20669 from DWesl/cygwin-use-reference-blasSebastian Berg2022-04-201-15/+0
|\ | | | | CI, TST: Run Cygwin CI with Netlib reference BLAS and re-enable linalg tests
| * CI: Run Cygwin CI with Netlib reference BLAS.DWesl2021-12-271-15/+0
| |
* | BUG: Consistent promotion for norm for all values of ord (#17709)Toshiki Kataoka2022-04-071-19/+27
|/ | | | | | | | | Previously, numpy.linalg.norm would return values with the same floating-point type as input arrays for most values of the ``ord`` parameter, but not all. This PR fixes this so that the output dtype matches the input for all (valid) values of ``ord``. Co-authored-by: Kenichi Maehashi <webmaster@kenichimaehashi.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* STY: Wrap long lines in linalg test.DWesl2021-12-241-4/+9
|
* TST: Mark the failing tests as xfail.DWesl2021-12-241-18/+30
|
* BUG: Fix tensorsolve for 0-sized inputIvan Yashchuk2021-11-291-0/+21
| | | | | | | | `array.reshape(-1, size)` doesn't work with 0 in the dimensions. The fix is to use explicit shape instead of `-1`. For "non-square" tensors the `ValueError` would come from the reshape call, while previously `LinAlgError` appeared from the solve call. To have the same error type I added a check for squareness before the reshape.
* TST: remove obsolete TestF77MismatchH. Vetinari2021-11-251-53/+0
|
* MAINT: remove unused importsAlessia Marcolini2021-10-081-3/+0
|
* DOC: Typos found by codespellDimitri Papadopoulos2021-09-211-4/+4
|
* MAINT: Disable test_blas64_dot.Charles Harris2021-07-151-4/+5
| | | | | | | This test is failing due to system oom during amd64 wheel tests with ILP64 OpenBLAS. Should not be run on account of memory restrictions, but evidently those are not reliably reported to the docker container running the tests.
* fixed linting issuesczgdp18072021-06-241-4/+5
|
* Addressed testing reviewsczgdp18072021-06-241-18/+22
|
* removed debug prints and addressed reviewczgdp18072021-06-071-4/+0
|
* removed trailing white spacesczgdp18072021-06-051-3/+3
|
* tests for stacked inputs addedczgdp18072021-06-051-0/+61
|
* TST: xfail `TestCond.test_nan` unconditionallyRalf Gommers2021-05-081-3/+6
| | | | | | | This is happening on too many build configurations, and it's not completely clear if it's just an OpenBLAS version or also depends on something else. Reported as happening mostly on macOS, but also on Fedora.
* See #15986. Chain exceptions in linalgtautaus2021-01-312-4/+4
|
* Convert some strings to fstrignsJakob2020-10-242-5/+5
|
* ENH: update numpy.linalg.multi_dot to accept an `out` argument (#15715)sslivkoff2020-04-301-0/+35
| | | | | | | | | | | | | * ENH: update numpy.linalg.multi_dot to accept an `out` argument * TST ensure value returned by numpy.linalg.multi_dot matches out * DOC add note about initial call to numpy.linalg.multi_dot * DOC add release note for #15715 Co-authored-by: Matti Picus <matti.picus@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* MAINT: Add better error handling in linalg.norm for vectors and clarify it ↵Jim2020-03-122-3/+4
| | | | | | | | | | | | in documentation (#15740) * Clarify `fro` and `nuc` usage in linalg.norm documentation (see #15533). * Add improved error handling when getting Frobenius norm from a vector (see #15533). * Fix comment in linalg norm test. Closes gh-15533.
* Merge pull request #15468 from hameerabbasi/fix-svd-sortedMatti Picus2020-02-061-0/+8
|\ | | | | BUG: Fix for SVD not always sorted with hermitian=True
| * BUG: Fix for SVD not always sorted with hermitian=TrueHameer Abbasi2020-02-051-0/+8
| |
* | TST: mark the top 3 slowest tests to save ~10 secondsmattip2020-02-021-0/+1
|/
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-053-16/+16
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-034-8/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* TST: linalg: add ilp64 lapack low-memory smoketestPauli Virtanen2019-12-211-0/+28
| | | | | LAPACK lwork call does not require much memory, and can be used as a smoketest to whether LAPACK really uses 64-bit integers.
* TST: fix up issues in requires_memory decoratorPauli Virtanen2019-12-041-1/+1
| | | | Fix wrong multiplier for /proc/meminfo, and do style cleanups.
* TST: linalg: add smoke test for 64-bit blasPauli Virtanen2019-12-011-1/+15
|
* MAINT: revert gh-14800, which gave precedence to OO->O over OO->?mattip2019-11-061-3/+4
|
* ENH: add OO->? loops, use np.compare(a, b, dtype=bool), add commentsmattip2019-10-301-2/+2
|
* WIP, DEP, ENH: finish richcompare changes from 1.10mattip2019-10-291-4/+3
|
* MAINT: Replace integers in places where booleans are expectedMSeifert042019-07-011-3/+3
|
* Merge pull request #12693 from eric-wieser/gh-9436-hermitianMatti Picus2019-01-131-13/+46
|\ | | | | ENH: Add a hermitian argument to `pinv` and `svd`, matching `matrix_rank`
| * ENH: Add a hermitian argument to `pinv` and `svd`, matching `matrix_rank`Eric Wieser2019-01-071-13/+46
| | | | | | | | Related to gh-9436
* | Merge pull request #12201 from tylerjereddy/test_linalg_commonTypeSebastian Berg2019-01-111-0/+7
|\ \ | |/ |/| TST: coverage for _commonType()
| * TST: coverage for _commonType()Tyler Reddy2018-11-131-0/+7
| | | | | | | | | | | | | | * test uncovered path in linalg.linalg._commonType() when an unsupported inexact scalar array is used
* | MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-061-4/+1
|/ | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* Merge pull request #12215 from tylerjereddy/linalg_lstsq_dim_checkCharles Harris2018-11-011-1/+10
|\ | | | | TST: test dims match on lstsq()
| * TST: test dims match on lstsq().Tyler Reddy2018-10-181-1/+10
| |
* | TST: add test for tensorinv()Tyler Reddy2018-10-261-0/+41
|/ | | | | * tensorinv() was previously completely uncovered by unit tests
* TST: test multi_dot with 2 arraysTyler Reddy2018-10-161-0/+8
|
* TST: prefer pytest.skip() over SkipTestTyler Reddy2018-09-211-3/+3
| | | | | | | | | | | | * replace most usage of SkipTest() with pytest.skip() * where possible, we avoid use of the standard library SkipTest because unittest skipping is routed through the pytest nose compatibility layer in that scenario, which can prevent an easy trace back to the test line where the skip occurred
* TST: Parametrize some linalg tests over types.Elliott Sales de Andrade2018-09-061-70/+52
| | | | | | | | | | | | | | | | | When code does: ```python def test(): def check(dtype): # code for dtype in [types]: check(dtype) ``` replace it with: ```python @pytest.mark.parametrize('dtype', [types]) def test(dtype): # code ```
* MAINT: reformat line spacing before test methodsmattip2018-08-191-2/+0
|
* Merge pull request #11691 from charris/fix_matrix_power_regressionMatti Picus2018-08-081-57/+74
|\ | | | | BUG: Make matrix_power again work for object arrays.