| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \
| |/
| |
| | |
BUG: Make numpy import when run with Python flag '-OO
|
| |
| |
| |
| |
| |
| |
| | |
This consists of checking for a docstring equal to None and skipping two
tests that require docstrings.
Closes #5148.
|
|\ \
| | |
| | | |
documentation updates
|
| |/
| |
| |
| | |
see gh-4422
|
|\ \
| | |
| | | |
BUG Masked recarray assignment with [row][record] does not work
|
| |/ |
|
|\ \
| |/
| | |
ENH: avoid meshgrid and fancy indexing for 1d masked sort
|
| |
| |
| |
| |
| | |
Improves performance by using the simple indexing path and memory by
avoiding creating a full meshgrid.
|
|\ \
| | |
| | | |
MAINT: Simplify some uses of errstate context manager.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This changes, e.g.,
with np.errstate():
np.seterr(divide='ignore')
...
to
with np.errstate(divide='ignore'):
...
|
|/ / |
|
| | |
|
|/
|
|
| |
saves a relatively expensive bool -> x cast
|
|\
| |
| | |
ENH: apply_along_axis accepts named arguments
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
many masked median along a small dimension is extremely slow due to the
usage of apply_along_axis which iterates fully in python. The unmasked
median is about 1000x faster.
Work around this issue by using indexing to select the median element
instead of apply_along_axis.
Further improvements are possible, e.g. using the current np.nanmedian
approach for masked medians along large dimensions so partition is used
instead of sort or to extend partition to allow broadcasting over
multiple elements.
Closes gh-4683.
|
| |
| |
| |
| |
| |
| |
| |
| | |
tolist() converts numpy integers to python integers which are converted
back to numpy integers by the indexing.
meshgrid(indexing='ij') returns the indices wanted here as the right type.
triples performance of sorting a size=(200, 200, 50) array along axis 2
and reduces memory usage by almost 40%.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The masked array count method was fixed to use np.intp when doing sums.
The return type is always np.intp except for count(arr, axis=None) when
arr has no mask, in which case the return type is that of ndarray.size.
The test errors were noted in #4698.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Revert "ENH: ma.asarray() and ma.asanyarray() will pass through input
of the correct type."
This reverts commit d8fd28389adb491e24b7cdc25cd1b20f539310c3.
That commit caused test errors in scipy, which was apparently
expecting a copy rather than a passed through array. The idea
may be good, but at a minimum it should probably be preceded
by a deprecation period.
Closes #4675.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
For repr, use the name of the base class in output as "masked_<name>"
(with name=array for ndarray to match the previous implementation).
For str, insert masked_print_option in an ndarray view of the object
array that is created for string output, to avoid calling __setitem__
in the base class. Add tests to ensure this works.
|
|\ \
| | |
| | | |
BUG: Masked arrays and apply_over_axes
|
| |/
| |
| |
| |
| |
| |
| | |
Masked arrays version of apply_over_axes did not apply
function correctly to arrays with non-trivial masks.
Fixes #4461.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Two changes to numpy.ma.core._check_fill_value:
1. When the fill value is a string and the array type is not one of
'OSUV', raise TypeError instead of using the default fill value.
2. When the fill value overflows the type, raise TypeError instead
of OverflowError.
Closes #3213.
|
|\ \
| | |
| | | |
ENH: ma.asarray() and ma.asanyarray() will pass through input of the cor...
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previous implementation relied on ma.asarray() to always create
a new object.
See gh-4043.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
type.
If x is of type MaskedArray for ma.asarray(x) or any subtype of
MaskedArray for ma.asanyarray(x), these functions will simply return x.
This makes them consistent with their numpy counterparts.
Closes gh-4043.
|
| |/
|/|
| |
| | |
Fixes #2219.
|
| |
| |
| |
| |
| |
| |
| |
| | |
When string fill value is passed to the filled method of
a masked array with object ('O') dtype, it is ignored and
masked elements are filled with '?' instead.
Fixes #4436
|
| |
| |
| | |
A typo assigned it the documentation for argmax.
|
|\ \
| | |
| | | |
DEP: Deprecate boolean math operations
|
| | |
| | |
| | |
| | |
| | |
| | | |
Casting y to an inexact type fixes problems such as
abs(MIN_INT) < 0, and generally makes sense since the allclose
logic is inherently for float types.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Boolean - is not well defined, especially the unary and
binary operator are not compatible. In general boolean
minus seems to have no real application and does not do
what might be expected.
All "allclose" type functions (numpy, tests, masked) have to
now check for boolean to avoid the deprecation warning. In
the future one could think about removing it again and just
allowing the upcast.
|
|/ /
| |
| |
| |
| |
| |
| | |
tostring returns bytes which are not equal to string, so provide a
tobytes function alias.
tostring does not emit a deprecation warning yet so rdepends do not need
to check two names to support older versions of numpy without warnings.
|
| |
| |
| |
| | |
Replace mention of variance in numpy.ma.average doc string with average.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The inconsistency of ma.count when appled on masked_array with mask as
'nomask' has been removed. the return type of the function has also been
standardized according to the docs.Corresponding changes in testing to
check the functioning of ma.count
Closes gh-3368 and gh-4228
|
|/
|
|
|
|
|
|
| |
When a masked array with nomask was passed to ma.compressed()
function, the result was the original masked array instead of
an ndarray.
Closes gh-4026.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
The current implementation assigns the mask value to a.flat, where a is
the mask being updated. In the scalar case, that is slower than
assigning to a[...], so when a is an instance of int, float, np.bool_,
or np.number use that instead.
|
|
|
|
|
|
|
|
|
|
|
|
| |
WarningManager was a workaround for the lack of the with statement
in Python versions < 2.6. As those versions are no longer supported
it can be removed.
Deprecation notes are added to WarningManager and WarningMessage, but
to avoid a cascade of messages in third party apps, no warnings are
raised at this time, that can be done later.
Closes #3519.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|