summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * 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
| * ENH: allow argument to matrix_rank to be stackedEric Wieser2017-02-241-2/+3
| | | | | | | | Fixes #5905
* | MAINT: Remove asbytes_nested where b prefixes would sufficeEric Wieser2017-03-251-3/+1
| |
* | ENH: Implement most linalg operations for 0x0 matricesEric Wieser2017-03-041-20/+5
| | | | | | | | | | | | | | | | | | | | Fixes #8212 det: return ones of the right shape slogdet: return sign=ones, log=zeros of the right shape pinv, eigvals(h?), eig(h?): return empty array(s?) of the right shape svd & qr: not implemented, due to complex return value rules
* | MAINT: replace len(x.shape) with x.ndimEric Wieser2017-02-241-1/+1
|/
* Merge pull request #8584 from eric-wieser/resolve_axisMarten van Kerkwijk2017-02-211-2/+2
|\ | | | | MAINT: Use the same exception for all bad axis requests
| * MAINT: Be specific about where AxisError is raisedEric Wieser2017-02-201-2/+2
| | | | | | | | These were tested by temporarily removing the base classes from AxisError
| * MAINT: Use normalize_axis_index in all python axis checkingEric Wieser2017-02-201-2/+2
| | | | | | | | | | | | | | As a result, some exceptions change from ValueError to IndexError This also changes the exception types raised in places where normalize_axis_index is not quite appropriate
* | fixup! TST: Refactor all the test case listsEric Wieser2017-02-091-89/+77
| |
* | TST: Correct test cases to actually make senseEric Wieser2016-12-191-5/+5
| | | | | | | | | | | | These testcases were never used in the first place, due to a typo. This makes their dimensions match the order of the other test cases, even though those also did not run
* | TST: Refactor all the test case listsEric Wieser2016-12-191-77/+176
| | | | | | | | | | Allows each individual function to inspect the flags of a certain test, and decide whether an exception will be thrown
* | TST: Adjust the precision of assert_almost_equal, but based on the typeEric Wieser2016-12-191-8/+11
| | | | | | | | | | SVD was previously being too generous with accuracy on doubles. This allows pinv, the test for which was previously was too imprecise, to pass.
* | TST: Enable testing pinv on non-square matricesEric Wieser2016-12-191-1/+1
| |
* | TST: Prevent non-square testcases being hidden by square ones (fix typo)Eric Wieser2016-12-191-1/+1
| |
* | TST: Correct pinv test case such that it doesn't fail correct casesEric Wieser2016-12-191-1/+1
| |
* | TST: Add some non-square 0-shaped test-casesEric Wieser2016-12-191-0/+6
| |
* | TST: Correct empty square test case to actually be squareEric Wieser2016-12-191-3/+3
|/ | | | atleast_2d(array([], dtype=double)) returns an array of shape (1, 0), not (0, 0)
* TST: Silence warnings otherwise shown in release modeSebastian Berg2016-09-021-2/+6
| | | | | These are warnings, which when raised as an error for one reason or another are already silenced.
* TST: Use new warnings context manager in all testsSebastian Berg2016-09-021-5/+5
| | | | | | | | In some places, just remove aparently unnecessary filters. After this, all cases of ignore filters should be removed from the tests, making testing (even multiple runs) normally fully predictable.
* BUG: fix float16 type not being called due to wrong orderingJulian Taylor2016-08-051-2/+2
| | | | closes gh-7897
* TST: More tests for linalg.norm() with object arraysMatthias Geier2016-05-031-1/+41
|
* BUG: linalg.norm(): Don't convert object arrays to floatMatthias Geier2016-04-291-0/+6
| | | | This fixes #7575 (Regression in linalg.norm() using dtype=object).
* BUG: Make sure that the `ord=0` case returns a float.John Kirkham2016-01-221-4/+1
|
* TST: Verify that `norm` is properly casting values to floats as needed.John Kirkham2016-01-221-0/+96
|
* MAINT: Replace assert with assert_(...) in some tests.Charles Harris2015-12-101-2/+2
|
* MAINT: Include from __future__ boilerplate in some files missing it.Charles Harris2015-12-051-0/+2
| | | | | Some newer *.py files are missing the `from __future__` boilerplate that helps assure Python2 and Python3 compatibility.
* ENH: testing: add SkipTest and KnownFailureExceptionEvgeni Burovski2015-11-161-2/+1
| | | | | | | | * use SkipTest in numpy tests instead of importing it from nose * add a KnownFailureException as an alias for KnownFailureTest (the former is preferred, but the latter is kept for backcompat) * rename the KnownFailure nose plugin into KnownFailurePlugin, and keep the old name for backcompat