| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | |
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
PEP8 and pyflakes fixups for numpy/ma/*.py and numpy/ma/tests/*.py
Merge cleanups prior to 1.10 release.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Those test functions were incorrectly importing test functions
from numpy/ma/testutils that were actually not defined there, but
rather in numpy/testing. That did not cause an error when testutils
was '*' importing all the test functions, but it was deceptive as
some of the functions might appear to support masked arrays when
they do not.
|
| | | | | |
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | | |
closes gh-6062
done with help of Sebastian Berg! =)
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
in array to close issue #586.
Also added unit tests.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously views of structured arrays containing objects were completely
disabled. This commit adds more lenient check for whether an object-array
view is allowed, and adds similar checks to getfield/setfield
Fixes #2346. Fixes #3256. Fixes #2599. Fixes #3253. Fixes #3286.
Fixes #5762.
|
| | | |
| | | |
| | | |
| | | | |
Fixes gh-5862
|
| | | |
| | | |
| | | |
| | | |
| | | | |
'fweights' allows integer frequencies to be specified for observation vectors,
and 'aweights' provides a more general importance or probabalistic weighting.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #5846 (If called with an empty array as first argument, the returned
array had dtype bool instead of the dtype of the input array)
|
|\ \ \ \
| | | | |
| | | | | |
Ix intp
|
| | | | | |
|
| | | | | |
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
ENH: Multiple comment tokens in loadtxt
|
| | | | | |
|
| |/ / /
|/| | | |
|
|\ \ \ \
| | | | |
| | | | | |
Fix read_array_header_*
|
| |/ / / |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The bias and ddof arguments had no effect on the calculation of the
correlation coefficient because the value cancels in the calculation.
Deprecate these arguments to np.corrcoef and np.ma.corrcoef.
|
|\ \ \
| | | |
| | | | |
BUG: Fixed issue #4679 - make numpy.tile always return a copy
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Tile now copies the input when it is a numpy array and all dimensions are
repeated only once.
|
|\ \ \ \
| | | | |
| | | | | |
ENH: PyArray_FromInterface checks descr if typestr is np.void
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When the 'typestr' member of the __array_interface__ dictionary defines
a np.void dtype, check the 'descr' member, and if it is a valid dtype
description and it is not the default one, use it to construct the
dtype for the array to return.
This fixes #5081, as as_strided no longer has to worry about changing
the dtype of the return.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The problem is that the Python complex type constructor only accepts a
pair of numbers or a string, unlike other numeric types it does not work
with byte strings. The numpy error is subtle, as loadtxt opens the file
in the default text mode, but then converts the input lines to byte
strings when they are split into separate values. The fix here is to
convert the values back to strings in the complex converter.
Closes #5655.
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Add pickle compatibility flags to numpy.save and numpy.load. Allow only
combinations that cannot corrupt binary data in Numpy arrays. Use the
same default values as Python pickle.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Fix StringConverter to avoid OverflowError in genfromtxt. Before, int(2**66) would work
(and return a ‘long’) but then np.array([2**66], dtype=np.integer) would not work and
return an OverflowError which would propagate to genfromtxt. This commit fixes this by
ensuring testing in advance whether an OverflowError will occur. In addition, this adds
an explicit np.int64 entry on systems where integer means int32. Values larger than
2**63-1 will be cast as float. This includes a regression test and adds an entry to the
release notes.
|
| | | | | |
|
|/ / / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Per the mailing list discussion [1], I have implemented a new function
`broadcast_to` that broadcasts an array to a given shape according to
numpy's broadcasting rules.
[1] http://mail.scipy.org/pipermail/numpy-discussion/2014-December/071796.html
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The tests were using assert_almost_equal and setting the precision to 3
decimals. The reason for that low precision appears to have been the
failure of the tests for a more reasonable precision. The fix was to use
assert_allclose instead.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The pmt function in financial.py does a zero divide when rate=0 because
error because the alternatives in np.where() are evaluated befor the
selection is made.first before going into the function however, the
denominator can be zero at that time.
Closes #4701.
|
| | |
| | |
| | |
| | | |
The strings must be produced by the python float.hex method.
|
|/ /
| |
| |
| | |
Also, added unittest for [int, array] combination arguments
|
|\ \
| | |
| | | |
BUG: Fix genfromtext NameValidator arguments passed to easy_dtype.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The function was useing `'u' in case_sensitive` to detect `upper`.
Make that more precise with `case_sensitive.startswith('u').
Raise ValueError if case_sensitive has unrecognized value.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The case_sensitive argument to np.recfromcsv has a default value of
'lower'. That value was not previously correctly passed on, but is
now, so the previous expected values in this test were incorrectly
upper cased.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
np.genfromtxt validates field names twice: once in genfromtxt and once
in easy_dtype. Whilst the arguments to genfromtxt are used in the first
validation, they aren't passed to easy_dtype (which is used only when
dtype != None) and therefore in this case the default validation (strip
non-alphanum, replace spaces) gets confusingly applied, ignoring
genfromtxt's arguments.
This patch adds fixes genfromtxt by passing the appropriate arguments
onwards to easy_dtype. That is probably the least invasive way to fix
the issue.
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This allows one to specify the maximum number of row processed in
in a call. The new functionality allows for reading more complex
data formats. For instance, multiple calls can be used to read in
multiple arrays stored in a single file.
Closes #5084.
Closes #5093.
|
| | |
|
|\ \
| | |
| | | |
ENH: Improve arg handling & enhance test suite for `np.pad`
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This PR adds an implementation of `nanprod`.
The actual function is a two-liner adapted from `nansum`. Most of this PR
consists of documentation and tests (for which I took the opportunity to do
some consolidation).
A method with the same functionality exists in pandas, and I was surprised to
discover that it's not in numpy.
|
| |
| |
| |
| |
| | |
The new searchsorted-based digitize introduced in #5101 segfaults
when it should raise a TypeError.
|