| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Add `print_function` to all `from __future__ import ...` statements
and use the python3 print function syntax everywhere.
Closes #3078.
|
|\
| |
| | |
Fix qr mode
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|