| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
|
| |
Some newer *.py files are missing the `from __future__` boilerplate
that helps assure Python2 and Python3 compatibility.
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
This was buggy, because the underlying functions supported it
partially but cond was not aware of this.
Closes gh-6351
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
`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
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
allows passing flags like --pdb to test files
also add call to files where its missing
|
|
|
|
| |
https://github.com/numpy/numpy/issues/4733
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
The variable used was not defined, causing an error when the exception
was raised.
Closes #3146.
|
| |
|
|
|
|
|
|
| |
asfarray truncates the complex part, so it must be avoided for complex
types.
Closes gh-4156.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
to prevent unintentional use of wrong function. Restores 1.7 behavior.
|
|
|
|
|
|
| |
UPLO was cast to bytes and compared to a string which is always false in
python3.
closes gh-3977
|
| |
|
|
|
|
| |
At least OSX Accelerate fails for this case.
|
| |
|
| |
|
|
|
|
|
| |
Some of the functions removed were untested, and apparently did not
function correctly (cholesky_up, inner1d, maybe more).
|
|
|
|
|
|
| |
Also remove TestCase subclassing, so that generator tests work. Also
fix bugs in the existing generator tests that were not actually run
previously.
|
|
|
|
|
| |
This was previously correct, but the special case was missing
since the gufunc code cannot handle it.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Now is as good a time as any with open PR's at a low.
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
which case matrix norms of the collection of 2-D matrices are computed.
|
|
|
|
|
| |
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.
|
| |
|
|\
| |
| | |
Add generalized ufunc linalg functions and make numpy.linalg use them
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
Also, link umath_linalg against the system BLAS/LAPACK if available.
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|