summaryrefslogtreecommitdiff
path: root/numpy/linalg
Commit message (Collapse)AuthorAgeFilesLines
* ENH: inv/solve work with empty inner and others empty outer arraySebastian Berg2013-08-042-16/+82
| | | | | | | 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.
* MAINT: linalg: some more clean up in norm: 'nd' was defined but not usedWarren Weckesser2013-07-201-5/+4
|
* BUG: linalg: norm was computing and then ignoring a productWarren Weckesser2013-07-191-2/+1
|
* MAINT: Use np.errstate context manager.Charles Harris2013-07-111-5/+6
| | | | | | | | | | | | | Now that Python < 2.6 is no longer supported we can use the errstate context manager in places where constructs like ``` old = seterr(invalid='ignore') try: blah finally: seterr(**old) ``` were used.
* DOC: another minor tweak of linalg.lstsq doc stringFazlul Shahriar2013-06-131-1/+2
|
* DOC: minor tweak of linalg.lstsq doc stringFazlul Shahriar2013-06-131-2/+1
|
* DOC: fix typo in linalg.lstsq doc stringFazlul Shahriar2013-06-131-2/+2
|
* MAINT: use PyOS_snprintf instead of snprintfChristoph Gohlke2013-06-091-1/+1
| | | PyOS_snprintf is portable and more secure than snprintf.
* BUG: import longdouble instead of float128Julian Taylor2013-06-071-3/+3
| | | | | | i386 does not have 16 byte long double by default (only 12 byte/float96) so the import prevents numpy startup. Introduced in 1.8.0dev 40000f508
* typoargriffing2013-06-051-1/+1
|
* MAINT: linalg: simplify the computation of the svd-based matrix norms, and ↵Warren Weckesser2013-06-051-11/+3
| | | | tweak the norm function's docstring.
* STY: linalg: some PEP8 clean up.Warren Weckesser2013-06-042-36/+40
|
* ENH: linalg: allow the 'axis' argument of linalg.norm to be a 2-tuple, in ↵Warren Weckesser2013-06-042-19/+134
| | | | which case matrix norms of the collection of 2-D matrices are computed.
* DOC: linalg: Improve the docstring of the new norm function.Warren Weckesser2013-06-021-3/+4
|
* MAINT: linalg: removed unused imports from linalg.pyWarren Weckesser2013-06-011-5/+4
|
* ENH: linalg: Add the `axis` keyword to linalg.norm.Warren Weckesser2013-06-012-19/+66
| | | | | 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.
* MAINT: fix some compiler warningsJulian Taylor2013-05-251-4/+4
| | | | | implicit declarations, wrong declarations, unused variables and fixes a comparison typo bug in multiarraymodule.c
* Fix segfaultJay Bourque2013-05-141-1/+1
| | | | outer_steps array should be size 4 since op_count can be either 2 or 4
* BLD: Fixes for building on win32 with MSVC 2008Mark Wiebe2013-05-131-1/+1
|
* TST: linalg: make sure that running the xerbla test is safePauli Virtanen2013-05-121-1/+43
|
* BLD: fix Bento build after umath_linalg move from core to linalg module.Ralf Gommers2013-05-042-7/+6
|
* MAINT: Apply 2to3 idioms fixer.Charles Harris2013-05-022-4/+3
| | | | | | | | | | | | | | | | | | | The idioms fixer makes the following replacements. 1) int <- bool 2) comparison or identity of types <- isinstance 3) a.sort() <- sorted(a) There were two problems that needed to be dealt with after the application of the fixer. First, the replacement of comparison or identity of types by isinstance was not always correct. The isinstance function returns true for subtypes whereas many of the places where the fixer made a substitution needed to check for exact type equality. Second, the sorted function was applied to arrays, but because it treats them as iterators and constructs a sorted list from the result, that is the wrong thing to do. Closes #3062.
* Merge pull request #3220 from pv/linalg-guCharles Harris2013-04-1718-47417/+130408
|\ | | | | 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-132-1/+39
| |
| * BUG: linalg: fix LAPACK error handling in lapack_litemodulePauli Virtanen2013-04-131-0/+54
| | | | | | | | | | If an exception is pending (raised from xerbla), the routines must return NULL.
| * BUG: linalg: do not assume that GIL is enabled in xerbla_Pauli Virtanen2013-04-131-0/+4
| | | | | | | | | | With the new ufunc-based linalg, GIL is released in ufuncs, and needs to be reacquired when raising errors in xerbla_.
| * TST: linalg: test return types of generalized linalg routinesPauli Virtanen2013-04-121-0/+83
| |
| * ENH: linalg: use signature= for internal casting rather than astype in ↵Pauli Virtanen2013-04-121-12/+23
| | | | | | | | linalg ufuncs
| * BUG: linalg: make umath_linalg to track errors from all inner loop iterationsPauli Virtanen2013-04-122-51/+47
| | | | | | | | | | | | | | 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-102-4/+3
| |
| * MAINT: move gufuncs_linalg_contents.rst to the docstring of the modulePauli Virtanen2013-04-102-123/+103
| |
| * MAINT: move umath_linalg under numpy/linalg and use the same lapack_litePauli Virtanen2013-04-1017-47043/+129876
| | | | | | | | Also, link umath_linalg against the system BLAS/LAPACK if available.
| * TST: linalg: add tests for generalized linalg functionsPauli Virtanen2013-04-101-34/+89
| |
| * ENH: linalg: use _umath_linalg for svd()Pauli Virtanen2013-04-101-59/+39
| |
| * ENH: linalg: use _umath_linalg for eigh()Pauli Virtanen2013-04-101-44/+24
| |
| * ENH: linalg: use _umath_linalg for eig()Pauli Virtanen2013-04-101-58/+29
| |
| * ENH: linalg: use _umath_linalg for eigvalsh()Pauli Virtanen2013-04-101-44/+20
| |
| * ENH: linalg: use _umath_linalg for eigvals()Pauli Virtanen2013-04-101-42/+20
| |
| * ENH: linalg: use _umath_linalg for cholesky()Pauli Virtanen2013-04-101-22/+12
| |
| * ENH: linalg: use _umath_linalg for solve()Pauli Virtanen2013-04-101-34/+18
| |
| * ENH: linalg: use _umath_linalg for inv()Pauli Virtanen2013-04-101-8/+28
| |
| * ENH: linalg: use _umath_linalg for slogdet()Pauli Virtanen2013-04-101-26/+23
| |
| * ENH: linalg: use _umath_linalg for det()Pauli Virtanen2013-04-101-5/+20
| |
| * ENH: linalg: add helper routines for gufuncsPauli Virtanen2013-04-101-1/+48
| |
* | 2to3: Apply next fixer.Charles Harris2013-04-151-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The next builtin has been available since Python 2.6 and allows `it.next()` to be replaced by `next(it)`. In Python 3 the `next` method is gone entirely, replaced entirely by the `__next__` method. The next fixer changes all the `it.next()` calls to the new form and renames the `next` methods to `__next__`. In order to keep Numpy code backwards compatible with Python 2, a `next` method was readded to all the Numpy iterators after the fixer was run so they all contain both methods. The presence of the appropriate method could have been made version dependent, but that looked unduly complicated. Closes #3072.
* | 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 `dict` fixer.Charles Harris2013-04-061-2/+2
| | | | | | | | | | | | | | | In Python3 `dict.items()`, `dict.keys()`, and `dict.values()` are iterators. This causes problems when a list is needed so the 2to3 fixer explicitly constructs a list when is finds on of those functions. However, that is usually not necessary, so a lot of the work here has been cleaning up those places where the fix is not needed. The big exception to that is the `numpy/f2py/crackfortran.py` file. The code there makes extensive use of loops that modify the contents of the dictionary being looped through, which raises an error. That together with the obscurity of the code in that file made it safest to let the `dict` fixer do its worst. Closes #3050.
* 2to3: Apply `print` fixer.Charles Harris2013-04-0610-17/+17
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* Merge pull request #3191 from charris/2to3-apply-imports-fixerCharles Harris2013-04-061-2/+2
|\ | | | | 2to3: Apply `imports` fixer.
| * 2to3: Apply `imports` fixer.Charles Harris2013-04-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `imports` fixer deals with the standard packages that have been renamed, removed, or methods that have moved. cPickle -- removed, use pickle commands -- removed, getoutput, getstatusoutput moved to subprocess urlparse -- removed, urlparse moved to urllib.parse cStringIO -- removed, use StringIO or io.StringIO copy_reg -- renamed copyreg _winreg -- renamed winreg ConfigParser -- renamed configparser __builtin__ -- renamed builtins In the case of `cPickle`, it is imported as `pickle` when python < 3 and performance may be a consideration, but otherwise plain old `pickle` is used. Dealing with `StringIO` is a bit tricky. There is an `io.StringIO` function in the `io` module, available since Python 2.6, but it expects unicode whereas `StringIO.StringIO` expects ascii. The Python 3 equivalent is then `io.BytesIO`. What I have done here is used BytesIO for anything that is emulating a file for testing purposes. That is more explicit than using a redefined StringIO as was done before we dropped support for Python 2.4 and 2.5. Closes #3180.