summaryrefslogtreecommitdiff
path: root/numpy/linalg/tests/test_linalg.py
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
|
* 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-181-64/+64
| | | | | | | 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.
* 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-171-34/+203
|\ | | | | 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.
| * 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.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* Merge pull request #2965 from charris/fix-qr-modeCharles Harris2013-04-041-0/+104
|\ | | | | Fix qr mode
| * TST: Add more tests for qr factorization.Charles Harris2013-04-011-0/+104
| | | | | | | | | | | | | | | | The new tests cover the new modes 'complete' and 'raw'. The testing of the 'reduced', aka 'full' mode is improved and tests are added for the deprecation of the 'full' and 'economic' modes. A new file `numpy/linalg/tests/test_deprecations.py` was added for the deprecation tests.
* | 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* 2to3: Use modern exception syntax.Charles Harris2013-02-261-1/+1
| | | | Example: except ValueError,msg: -> except ValueError as msg:
* BUG: change default threshold for matrix_rankMatthew Brett2012-07-141-1/+16
| | | | | | | The default tolerance threshold for matrix_rank was passing as full rank some matrices that were numerically rank deficient. This commit changes the default tolerance to match the algorithm in MATLAB and Numerical recipes.
* BUG: native but not '=' byte order error in lapackMatthew Brett2012-03-171-0/+22
| | | | | | The check_object call in lapack_litemodule was checking if the passed array was of byteorder '=' or '|', but this check failed for arrays of specified native byte order ('<' on little-endian).
* STY: Cleanup test_linalg a bit.Charles Harris2011-05-101-22/+42
|
* TST: Add test for QR on empty arraySkipper Seabold2011-05-101-0/+5
|
* STY: Replace assert by assert_ in tests. There remain 124 uses ofCharles Harris2011-04-051-8/+8
| | | | assert in non-testing files that should be checked for correctness.
* STY: Replace old style classes in tests with classes subclassing object.Charles Harris2011-04-051-3/+3
|
* BUG: Python 2.4 doesn't accept the construction class foo():Charles Harris2011-04-051-1/+1
|
* BUG: fix tests in test_linalg.py. Do not subclass from TestCase.Ralf Gommers2011-04-031-6/+6
|
* BUG: linalg: lstsq should always return real residuals (#937)Pauli Virtanen2010-10-101-3/+80
|
* ENH: Add slogdet to the linalg module. The patch is from njs withCharles Harris2010-05-051-0/+19
| | | | slogdet substituted for sign_log_det. Closes ticket #1402.
* ENH - added matrix_rank function to linalgMatthew Brett2009-12-221-1/+21
|
* linalg: support '0-norm' (scipy ticket #1037)Pauli Virtanen2009-11-061-0/+2
|
* Fix eigenvalue tests, the eigenvalues needed sorting.Charles Harris2009-03-271-8/+8
| | | | Fix test_nanmin_alnan_on_axis, use assert_array_equal.
* BUG: fix #786, bad exception for wrong order for linalg.norm.David Cournapeau2009-03-021-6/+0
|
* Fix norm tests for single prec.David Cournapeau2009-03-021-11/+27
|
* Abstract away dtype for norm test.David Cournapeau2009-03-021-8/+14
|
* rename check_empty method to test_, so that is is picked up by nose.David Cournapeau2009-03-021-1/+1
|
* TEST: add tests for norm from #763.David Cournapeau2009-03-021-1/+41
|
* Use new-style classes with multiple-inheritance to address bug in IronPython.Stefan van der Walt2009-01-061-1/+1
|
* Added tests for eigenvalue/vector functions for Hermitian matrices..Alan McIntyre2008-07-141-0/+55
|
* Clean up test output such that a completely-passing test suite has no ↵Robert Kern2008-07-031-3/+1
| | | | extraneous output.
* Restore old test framework classes.Alan McIntyre2008-06-211-1/+1
| | | | | | | | | | | Added numpy.testing.run_module_suite to simplify "if __name__ == '__main__'" boilerplate code in test modules. Removed numpy/testing/pkgtester.py since it just consisted of an import statement after porting SciPy r4424. Allow numpy.*.test() to accept the old keyword arguments (but issue a deprecation warning when old arguments are seen). numpy.*.test() returns a test result object as before. Fixed typo in distutils doc.