summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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.
| * BUG: Make matrix_power again work for object arrays.Charles Harris2018-08-081-57/+74
| | | | | | | | | | | | | | | | | | This fixes a regression introduced in #10985. Using matmul instead of dot lost the object type while adding the ability to deal with matrix stacks. This implements a partial fix by using dot for 2-D object arrays, but object array stacks cannot be handled. Closes #11635.
* | ENH: support for empty matrices in linalg.lstsqJeremy Chen2018-08-031-4/+26
|/
* ENH: handle empty matrices in qr decomposition (#11593)Jeremy Chen2018-07-311-12/+19
| | | Ensure LWORK and LDA respect the requirements of the lapack methods (zgeqrf, dgeqrf, zungqr, dorgqr)
* ENH: Allow use of svd on empty arraysEric Wieser2018-06-271-13/+13
| | | | part of #8654
* TST: linalg: add regression test for gh-8577Pauli Virtanen2018-05-271-0/+36
| | | | | Add regression test that checks for certain bugs where results from sdot change if certain libraries are imported first.
* Merge branch 'master' into linalg-move-matrix-powerCharles Harris2018-05-141-178/+231
|\
| * MAINT: move linalg tests using matrix to matrixlibMarten van Kerkwijk2018-04-271-179/+232
| | | | | | | | | | This is in preparation for deprecation and eventual removal of the matrix class.
* | ENH: Allow stacks of matrices in matrix_power.Marten van Kerkwijk2018-04-291-11/+20
|/ | | | | Since linalg allows stacks of matrices generally, there is no reason not to allow it for matrix_power.
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-064-21/+4
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Switch to using pytest markersCharles Harris2018-04-042-12/+15
| | | | | | | | | | | Use standard pytest markers everywhere in the numpy tests. At this point there should be no nose dependency. However, nose is required to test the legacy decorators if so desired. At this point, numpy test cannot be run in the way with runtests, rather installed numpy can be tested with `pytest --pyargs numpy` as long as that is not run from the repo. Run it from the tools directory or some such.
* BUG: linalg: fix corner-case behavior of cond() + use SVD if possiblePauli Virtanen2018-02-121-27/+94
| | | | | | | | | | | | | Make np.linalg.cond(A, p) always use SVD for p=+-2 and not only p=None. Ensure inf is returned instead of nan when the condition number diverges for +/-2 norm. Ignore errors when inverting matrices for p = +-1, 'fro', +-inf, so that spurious LinAlgErrors are not raised. In those cases, report non-invertible matrices as having cond=inf. Add additional tests for cond().
* MAINT: repair deprecated yield testsxoviat2017-12-231-26/+26
|
* BUG: Ensure lstsq can handle RHS with all sizes.Marten van Kerkwijk2017-11-061-0/+12
| | | | | | | This fixes a bug in the creation of workspace arrays for a call to `lapack_lite.zgelsd`, which led to segmentation faults when a RHS was passed in that had larger size than the size of the matrix.
* TST: linalg: add basic smoketest for choleskyPauli Virtanen2017-09-301-0/+24
|
* ENH: add hermitian=False kwarg to matrix_powerCJ Carey2017-09-161-0/+13
| | | | | With a symmetric matrix, the more efficient `eigvalsh` method can be used to find singular values.
* BUG: Fix pinv on matrix stacksEric Wieser2017-09-121-2/+6
| | | | Fixes #8826
* ENH: Warn to change lstsq default for rcondSebastian Berg2017-08-191-1/+18
| | | | | The default parameter used by LAPACK (which was our default) is not very good, so implement a FutureWarning to change to a better default.
* TST, MAINT: Add `__init__.py` files to tests directories.Charles Harris2017-08-061-0/+0
| | | | | | | | This allows pytest to run with duplicate test file names. Note that `python <path-to-test-file>` no longer works with this change, nor will a simple `pytest numpy`, because numpy is imported from the numpy repository. However, `python runtests.py` and `>>> numpy.test()` are still available.
* MAINT: Remove `level=` keyword from test arguments.Charles Harris2017-08-051-6/+3
| | | | | | I don't know what that argument was used for, but it showis up in old tests and is not explicitly used within the tests. I assume it was part of an old testing framework and is now longer needed.
* MAINT/DOC: Use builtin when np.{x} is builtins.{x}.Eric Wieser2017-08-051-1/+1
| | | | | | | This is the case for x in {int, bool, str, float, complex, object}. Using the np.{x} version is deceptive as it suggests that there is a difference. This change doesn't affect any external behaviour. The `long` type is missing in python 3, so np.long is still useful
* TST: Remove unittest dependencies in numpy/linalg/tests.Charles Harris2017-07-242-28/+28
|
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-1/+1
| | | | Bare except is very rarely the right thing
* MAINT: Remove python side empty array handling from linalgSebastian Berg2017-04-291-1/+140
| | | | | | | | | The necessary fixup on the C-side of linalg has been done already (i.e. the gufuncs correctly work for these empty arrays). This also enables cholesky decomposition and fixes a small bug in pinv handling. Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Merge pull request #8682 from eric-wieser/stack-matrix_rankCharles Harris2017-04-121-2/+3
|\ | | | | ENH: allow argument to matrix_rank to be stacked