| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| | | |
| | | | |
DEP: Deprecate as_strided returning a writable array as default
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
DOC: Updated minor typos in function_base.py and test_function_base.py
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
nanpercentile was conforming to dimension convention of percentile incorrectly.
percentile outputs results for the different percentiles along the first
dimension of the output. nanpercentile was moving the reduction axis to the
front using swapaxes, which would move the first axis out of place if there
were more than two in the array. Added a test with more than two axes to
demonstrate and used rollaxis instead of swapaxes to do the interhange.
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: Fixed 'midpoint' interpolation of np.percentile in odd cases.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
'midpoint' must return the same as 'higher' and 'lower' when the two
are the same, not 'lower' + 0.5 as it was doing.
|
|\ \ \ \
| | | | |
| | | | | |
BUG: Fixed regressions in np.piecewise in ref to #5737 and #5729.
|
| |/ / /
| | | |
| | | |
| | | | |
Added unit tests for these conditions.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
isinstance(mode, str) is False in python2.7 when mode is of unicode
type, and mode is then mistakenly assumed to be a callable. See #7112
|
|/ / /
| | |
| | |
| | |
| | | |
Without the suffix, np.save creates a new file and the file
does not get cleaned up.
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: Handle multiple percentiles for all-nan slices in nanpercentile
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fix bug where nanpercentile would crash with an all-nan slices when
given multiple percentiles. Also corrects behavior where array sizes
different from numpy.percentile would be returned with keepdims enabled.
Fix #5760
|
|\ \ \ \
| | | | |
| | | | | |
DEP: Warn MaskedArray will return views of mask when sliced
|
| |/ / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
np.put and np.place do something only when the first argument
is an instance of np.ndarray. These changes will cause a TypeError
to be thrown in either function should that requirement not be
satisfied.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This replaces code of the pattern
```
fd, name = tempfile.mkstemp(...)
os.close(fd)
try:
do stuff with name
finally:
os.remove(name)
```
with
```
with temppath() as name:
do stuff with name
```
A few more complicated cases are also handled. The remains some
particularly gnarly code the could probably be refactored to use
temppath, but that is a more demanding project.
|
|\ \ \
| | | |
| | | | |
ENH: Tempfile context manager
|
| | | |
| | | |
| | | |
| | | |
| | | | |
The test is in numpy/lib/tests/test_io.py. This commit is intended
as a demonstration of using temppath.
|
|/ / /
| | |
| | |
| | | |
Closes gh-6863.
|
|\ \ \
| | | |
| | | | |
MAINT: Replace assert with assert_(...) in some tests.
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | | |
Discovered while cleaning up uses of the silly aliases like
'np.object'.
|
|\ \ \
| | | |
| | | | |
MAINT: Include from __future__ boilerplate in some files missing it.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Some newer *.py files are missing the `from __future__` boilerplate
that helps assure Python2 and Python3 compatibility.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The original had incorrect comparisons involving <=, <, and also failed
when the number of data points was 2. This fixes the use of the
comparisons and uses linear search for fewer than 5 data points.
The whole routine needs a simplified rewrite, but this takes care of the
bug.
Closes #6468.
|
|\ \ \
| | | |
| | | | |
BUG, MAINT: check that histogram range parameters are finite.
|
| | | |
| | | |
| | | |
| | | | |
assure this. Improved some error-types.
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* 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
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously an empty array resulting from split always had dimension 1-D.
In Numpy 1.9 a FutureWarning was raised to notify users that it was
planned to preserve the dimensions of empty arrays in a future numpy
release. This removes the FutureWarning and implements preservation of
dimensions.
Note that there was a bug in numpy 1.9 and the dimensions of empty
arrays was already preserved in some cases and no warning was issued.
This PR fixes that inconsistency by preserving the dimensions in all
cases rather than fixing the bug, as the dimension preserving behavior
was already depended on by some users. See the discussion in gh-6575
about this change.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Use a different strategy to detect whether np.load creates cycles.
Fixes gh-6571, I hope.
|
|\ \ \
| | | |
| | | | |
Disable view safety checks
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove unit tests for the view safety chekcs, which are to be reverted
in the next commit.
|
|/ / /
| | |
| | |
| | | |
Fixes GH6491
|
| | |
| | |
| | |
| | |
| | | |
np.median([]) returns NaN. Fixes bug/regression that raised an IndexError.
Added tests to ensure continued support of empty arrays.
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: Make sure warning for array split is always applied
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added tests for the x.x.dev0+1234567 form together with alpha and beta
versions of same.
Updates lifted from scipy.
|
|\ \ \ \
| | | | |
| | | | | |
DEP,MAINT: Change deprecated indexing to errors.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The deprecated operations changed to errors are
* Conversion of floats and booleans to npy_intp indexes.
* Conversion of single element integer arrays of ndim > 1 to indexes.
* Multiple ellipsis in index.
The affected deprecation tests have been been changed to check for
raised errors instead, but remain in test_deprecations.py for the
moment. They will be moved when the conversion of the remaining indexing
deprecations is complete.
|
|/ / / /
| | | |
| | | |
| | | | |
when given axis=None, behave the same as axis not being provided
|
|\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
MANT: searchsorted should return base ndarrays always
|
| | | | | |
|
|/ / / /
| | | |
| | | |
| | | | |
can now pass in bins='auto' (or 'scott','fd','rice','sturges') and get the corresponding rule of thumb estimator provide a decent estimate of the optimal number of bins for the given the data.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
`mode` is a required argument so just declare it as such. This does not
prevent it from being passed as a keyword argument.
|
| | | |
| | | |
| | | |
| | | | |
values to be modified
|