summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests
Commit message (Collapse)AuthorAgeFilesLines
* 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
* BUG,ENH: allow linalg.cond to work on a stack of matricesSebastian Berg2015-09-251-2/+12
| | | | | | | This was buggy, because the underlying functions supported it partially but cond was not aware of this. Closes gh-6351
* STY: PEP8 and pyflakes fixes for numpy/linalg/tests.Charles Harris2015-07-253-105/+154
|
* MAINT: eigenvalues returned by eigh are ascendingalex2015-06-221-13/+11
|
* MAINT: notice that eigvalsh returns a sorted arrayalex2015-06-191-7/+3
|
* TST: Make the test for linalg matrix norms coverage completeRittaNarita2015-03-301-20/+23
|
* ENH: nuclear normalex2014-12-251-5/+24
|
* BUG: Xerbla doesn't get linked in 1.10-devel.Charles Harris2014-12-241-3/+6
| | | | | | | | | | | Add our python_xerbla to the multiarray sources. That function is needed for all modules that link to the ATLAS 3.10 libraries, which are now all located in two files, libsatlas and libtatlas. Also make the test for xerbla linkage work better. If xerbla is not linked the test will be skipped with a message. Closes #5362.
* ENH: add `multi_dot`: dot with multiple arguments.Stefan Otte2014-11-101-2/+88
| | | | | | | | | | | `np.linalg.multi_dot` computes the dot product of two or more arrays in a single function call, while automatically selecting the fastest evaluation order. The algorithm for selecting the fastest evaluation order uses dynamic programming and closely follows: Cormen, "Introduction to Algorithms", Chapter 15.2, p. 370-378
* MAINT: Stop repeatedly running duplicate tests.Eric Moore2014-10-171-0/+1
| | | | | | These three tests don't make use of the infrastructre in _TestNorm. This means they are identical tests when run as part of TestNorm(Double,Single,Int64). Once is enough.
* ENH: Add keepdims to linalg.normEric Moore2014-10-171-0/+42
|
* TST: pass sys.argv to run_module_suite by defaultJulian Taylor2014-09-041-3/+5
| | | | | allows passing flags like --pdb to test files also add call to files where its missing
* TST: add more regression testing related to ↵alex2014-05-261-0/+3
| | | | https://github.com/numpy/numpy/issues/4733
* BUG: svd ufunc typoalex2014-05-221-1/+9
|
* BUG: Delay npyiter size check when size may changeSebastian Berg2014-03-121-0/+6
| | | | | | | | | | | | | When a multi index is tracked and RemoveAxis can be called, the size of the iterator may still change. This was causing failures for example for the SVD, because the gufunc machinery requires a temporarily larger iterator for output allocation. Thanks to Jaime (jaime.frio@gmail.com) for noting that this is plausible since the size check can be delayed pretty ok up until GetIterNext (or similar functions). Closes gh-4442
* BUG: Fix wrong variable in test_build.py exception.Charles Harris2014-02-151-5/+5
| | | | | | | The variable used was not defined, causing an error when the exception was raised. Closes #3146.
* MAINT: linalg: prune unused routines from lapack_litePauli Virtanen2014-01-121-5/+5
|
* BUG: fix complex norm of higher orderJulian Taylor2014-01-021-0/+12
| | | | | | asfarray truncates the complex part, so it must be avoided for complex types. Closes gh-4156.
* BUG: linalg: norm fails on longdouble, signed intLars Buitinck2013-12-261-0/+12
| | | | | | | | | | | | | | | | | | | | | This fixes the following bug with longdouble: >>> x = np.arange(10, dtype=np.longdouble) >>> np.linalg.norm(x, ord=3) Traceback (most recent call last): File "<ipython-input-5-7ee53a8ac142>", line 1, in <module> np.linalg.norm(x, ord=3) File "/tmp/v/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 2090, in norm return add.reduce(absx**ord, axis=axis)**(1.0/ord) UnboundLocalError: local variable 'absx' referenced before assignment As well as the handling of minimal values for signed integers: >>> x = np.array([-2**31], dtype=np.int32) >>> np.linalg.norm(x, ord=3) /tmp/v/lib/python2.7/site-packages/numpy/linalg/linalg.py:2090: RuntimeWarning: invalid value encountered in double_scalars return add.reduce(absx**ord, axis=axis)**(1.0/ord) nan
* MAINT: Refactor eigh and eigvalsh and associated tests.Charles Harris2013-10-261-41/+50
| | | | | | Do not convert the UPLO argument to a bytestring, it is not necessary. Distribute parts of the eigh tests into the appropriate TestEigvalsh or TestEigh test class.
* BUG: reject invalid UPLO with ValueError in eigh/eigvalshJulian Taylor2013-10-251-3/+29
| | | | to prevent unintentional use of wrong function. Restores 1.7 behavior.
* BUG: fix broken UPLO of eigh in python3Julian Taylor2013-10-251-1/+22
| | | | | | UPLO was cast to bytes and compared to a string which is always false in python3. closes gh-3977
* TST: Initialize some arrays to to avoid valgrind warningsSebastian Berg2013-10-241-1/+1
|
* BUG: linalg: don't tell BLAS to use zero stridesPauli Virtanen2013-10-121-1/+31
| | | | At least OSX Accelerate fails for this case.
* TST: linalg: better rtol choicePauli Virtanen2013-10-081-1/+5
|
* TST: linalg: add slightly bigger test case + don't catch KeyboardInterruptPauli Virtanen2013-10-081-1/+9
|
* MAINT: linalg: strip out unused gufuncs_linalg codePauli Virtanen2013-10-071-500/+0
| | | | | Some of the functions removed were untested, and apparently did not function correctly (cholesky_up, inner1d, maybe more).
* TST: linalg: add more comprehensive test cases for linalg funcsPauli Virtanen2013-10-071-223/+332
| | | | | | Also remove TestCase subclassing, so that generator tests work. Also fix bugs in the existing generator tests that were not actually run previously.
* BUG: Allos linalg.solve to handle zero equations.Sebastian Berg2013-10-011-0/+18
| | | | | This was previously correct, but the special case was missing since the gufunc code cannot handle it.
* MAINT: Make the qr raw mode test independent of the LAPACK library.Charles Harris2013-09-121-38/+22
| | | | | | | | The qr factorization is not unique and the values returned by the raw mode may differ between LAPACK versions. Consequently, the results cannot be checked against known values. Closes #3703.
* MAINT: Refactor test_xerbla to hide printed error messages.Charles Harris2013-09-111-36/+25
| | | | | | | | | | | Combine the xerbla override tests with the previous _is_xerbla_safe decorator. The xerbla checks are then made in a forked process where the outputs are closed so that if xerbla prints a message it does not appear. It would be nice to figure out a Windows version of this test. Closes #3704. Closes #3687.
* STY: Giant comma spacing fixup.Charles Harris2013-08-183-109/+109
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* STY: Giant whitespace cleanup.Charles Harris2013-08-181-7/+7
| | | | Now is as good a time as any with open PR's at a low.
* ENH: inv/solve work with empty inner and others empty outer arraySebastian Berg2013-08-041-0/+48
| | | | | | | This makes the inverse of a 0x0 array simply be 0x0 again. It also modifies the no-empty array check in favor of a no-empty *inner* array, since the gufuncs seem to handle the other case fine.
* STY: linalg: some PEP8 clean up.Warren Weckesser2013-06-041-34/+38
|
* ENH: linalg: allow the 'axis' argument of linalg.norm to be a 2-tuple, in ↵Warren Weckesser2013-06-041-3/+49
| | | | which case matrix norms of the collection of 2-D matrices are computed.
* ENH: linalg: Add the `axis` keyword to linalg.norm.Warren Weckesser2013-06-011-5/+24
| | | | | Also fixed a bug that occurred with integer arrays and negative ord. For example, norm([1, 3], -1) returned 1.0, but the correct value is 0.75.
* TST: linalg: make sure that running the xerbla test is safePauli Virtanen2013-05-121-1/+43
|
* Merge pull request #3220 from pv/linalg-guCharles Harris2013-04-172-34/+703
|\ | | | | Add generalized ufunc linalg functions and make numpy.linalg use them
| * TST: linalg: add tests for xerbla functionality (with and without GIL)Pauli Virtanen2013-04-131-1/+19
| |
| * TST: linalg: test return types of generalized linalg routinesPauli Virtanen2013-04-121-0/+83
| |
| * BUG: linalg: make umath_linalg to track errors from all inner loop iterationsPauli Virtanen2013-04-121-0/+13
| | | | | | | | | | | | | | This ensures that the FP invalid flag always reflects the return code from LAPACK. Fixes a bug in 63a8aef81 where umath_linalg raises a warning only if the error occurs in the last iteration of the ufunc inner loop.
| * BUG: linalg: fix Py3 syntaxPauli Virtanen2013-04-101-2/+2
| |
| * MAINT: move umath_linalg under numpy/linalg and use the same lapack_litePauli Virtanen2013-04-101-0/+500
| | | | | | | | Also, link umath_linalg against the system BLAS/LAPACK if available.
| * TST: linalg: add tests for generalized linalg functionsPauli Virtanen2013-04-101-34/+89
| |
* | 2to3: Apply the `numliterals` fixer and skip the `long` fixer.Charles Harris2013-04-131-2/+2
|/ | | | | | | | | | | | | | | | | | | The numliterals fixer replaces the old style octal number like '01' by '0o1' removes the 'L' suffix. Octal values were previously mistakenly specified in some dates, those uses have been corrected by removing the leading zeros. Simply Removing the 'L' suffix should not be a problem, but in some testing code it looks neccesary, so in those places the Python long constructor is used instead. The 'long' type is no longer defined in Python 3. Because we need to have it defined for Python 2 it is added to numpy/compat/np3k.py where it is defined as 'int' for Python 3 and 'long' for Python 2. The `long` fixer then needs to be skipped so that it doesn't undo the good work. Closes #3074, #3067.