| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Further progress in isolating matrix in preparation of its
deprecation. There is one place left with an explicit reference
to matrix (in MaskedArray.count), which is to be solved later.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Depending on the input, this would return:
* A single slice, if mask=nomask
* A list of slices, if mask is an array
* None, if mask is fully masked
The documented return value is a list, and all downstream callers of this
function end up having to correct for it not being one.
This affects the result of np.ma.notmasked_contiguous, which also did not
document these unusual return values.
|
|
|
|
|
|
| |
By not using this type of indexing, it becomes easier for subclasses to override indexing in a way that works correctly with numpy functions.
These locations were found by deprecating the behavior in question, which is deliberately not part of this commit
|
| |
|
| |
|
|
|
|
|
| |
Uses '_fromnxfunction_seq' just like 'vstack', 'hstack', etc.
Added release note to 1.15.0.
|
|
|
|
|
|
|
| |
This is the case for x in {int, bool, str, float, complex, object}.
Using the np.{x} version is deceptive as it suggests that there is a
difference. This change doesn't affect any external behaviour. The
`long` type is missing in python 3, so np.long is still useful
|
|
|
|
| |
Deliberately avoids tests, to prevent introducing a failure on old-style classes later.
|
|
|
|
| |
Bare except is very rarely the right thing
|
| |
|
| |
|
|
|
|
|
| |
Also adds a test for the disabled-by-design behaviour - this would return
raw matrices, not masked arrays
|
|
|
|
|
|
| |
This fixes gh-8331
Also update the docs for arraysetops to remove the outdated "1D" from the
description, which was already incorrect for np.unique.
|
| |
|
| |
|
|
|
|
|
| |
return nan as it did in 1.11 and same as normal median.
closes gh-8703
|
|
|
|
|
|
|
| |
As a result, some exceptions change from ValueError to IndexError
This also changes the exception types raised in places where
normalize_axis_index is not quite appropriate
|
|
|
|
| |
unnecessary since gh-8416
|
|
|
|
|
|
|
| |
the masked nans which are equivalent to valid infs must be replaced
with infs earlier otherwise the inf is lost in the masked sum of the low
and high part.
Closes gh-8487
|
| |
|
|
|
|
|
|
| |
For such arrays, the sum of the two entries closest to the middle was
not divided by 2. Now fixed, with test cases adapted to ensure this
stays OK.
|
|
|
|
|
|
|
|
|
|
|
| |
This requires to base masked median on sort(endwith=False) as we need to
distinguish Inf and NaN.
Using Inf as filler element of the sort does not work as then the mask is not
guaranteed to be at the end.
Closes gh-8340
Also fixed 1d ma.median not handling np.inf correctly, the nd variant
was ok.
|
|
|
|
| |
and an axis argument. Add test.
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes four bugs:
- Use of booleans for indexing in ma.extras._median
- Error when mask is nomask and ndim != 1 in ma.extras._median
- Did not work for 0-d arrays.
- No out argument for {0,1}-d arrays.
Closes #8015.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Recommended type for nd-indexing is a tuple. See #4434
|
|
|
|
|
|
| |
Fixes #5969.
Performance fix #4760 had caused wrong shaped results in the 1D case.
This fix restores the original 1D behavior.
|
| |
|
|
|
|
|
| |
Incorporates Nathaniels suggestions for a longer explanation
in the release notes.
|
|
|
|
| |
Closes gh-6863.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basic implementation of ma.dot is moved from the method to the function
and the function itself is moved from extras.py to core.py on account of
import complications. The mask_rowcols function from extras is also moved
to core.py as it is needed by dot. For backwards compatibility, both
functions are still exported in extras.__all__ and can be imported
from that module. They are not included in part of core.__all__.
An out parameter is also added to ma.dot.
This PR also closes #6611.
|
|
|
|
|
| |
Fix some long lines and indentation in numpy/ma/core.py and
numpy/ma/extras.py
|
|
|
|
|
|
|
|
|
|
|
| |
The np.ma.atleast_1d, np.ma.atleast_2d, np.ma.atleast_3d and np.ma.diagflat
function return arrays when given a scalar in the same manner as their non-ma
counterparts. Previously these function would return None.
Additionally, the np.ma vstack, row_stack, hstack, column_stack, dstack, and
hsplit functions now raise an expection when given a scalar argument.
closes #3367
|
|
|
|
|
|
| |
The worst case of alternating masked iterated all boundaries and sliced
half away, improve this by only iterating the needed half of the
boundary index array.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Also
* Add __all__ to numpy/ma/testutils.py
* Remove various stray "#"
We might want to consider removing/refactoring both numpy/ma/bench.py
and numpy/ma/timer_comparison.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Most of these fixes involve putting blank lines around
.. versionadded:: x.x.x
and
.. deprecated:: x.x.x
Some of the examples were also fixed.
|
|
|
|
|
|
| |
This is to make it easier to find and remove deprecated features.
It would be a good idea if all deprecations were made with similar
comments.
|
|
|
|
|
|
| |
Modified the handling that np.ma.compress_nd does of its 'axis'
argument, to more closely follow that of ufunc methods, including
error messages for wrong values.
|
|
|
|
|
| |
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)
|
|
|
|
| |
Provides a way to supress slices along an abitrary tuple of dimensions.
|
|
|
|
|
|
| |
MaskedArray used to inherit ndarray.dot which ignored masks in the operands.
Fixes issue #5185.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Fixed typos in docstrings were updated for functions where the parameter
names in the docstring didn't match the function signature.
|
|
|
|
|
|
|
|
|
|
| |
This fixes the incorrect handing of masked NaNs by
``np.ma.polyfit``. Instead of passing the mask into
``np.polyfit`` by setting the weight of the masked
points to zero, the subset of elements of which are
to be fitted are passed instead.
Closes #5591
|
| |
|
|\
| |
| | |
BUG: fix ma.median used on ndarrays
|