| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
BUG: Make `mask_invalid` consistent with `mask_where` if `copy` is set to `False`
|
| | |
|
| | |
|
| |
| |
| |
| | |
test for type erroring.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add examples to ma.max function
* indent fix
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Indententation fixes
* Indent fixes
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Indent fixes
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Added example that gives masked array
* fix output indent
* Update numpy/ma/core.py
* Update numpy/ma/core.py
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| | |
|
| | |
|
| | |
|
|\ \
| |/
|/| |
BUG: Distinguish exact vs. equivalent dtype for C type aliases.
|
| |
| |
| |
| |
| | |
Fix a false mismatch. Separate dtype objects, even if equivalent,
cause distinct array views to be created.
|
| |
| |
| |
| | |
This reverts commit e2efced9bdfc773f5aca2487f12ab1cb2bd11833.
|
| |
| |
| |
| | |
This reverts commit 6b8d55e66e532d66e1701ad039b4cda306839b3f.
|
| |
| |
| |
| | |
This reverts commit 8cd6f4ca00b6e0da3833fc267d50067b2ddbc069.
|
| |
| |
| |
| | |
This reverts commit db1a98bf194771a677dbc0c2e06bc47f4a9947a8.
|
| |
| |
| |
| | |
This reverts commit b8c6d09208ecb7f0d83a8b06ab9e15e720f03730.
|
| |
| |
| |
| |
| |
| |
| | |
Fixed issue that occurs when trying to take the median of a list of masked arrays.
Added a check to see if the input is a list then converts to a masked array.
See issue #10757 for more information.
Co-authored-by: jsclose <jsclose@umich.edu>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixes the problem reported at
https://github.com/numpy/numpy/pull/21977#issuecomment-1186082534
The reduce method here effectively calls itself with an unmasked
MaskedArray (mask=nomask) and then expects either a MaskedArray or
a scalar. This change ensures that an ordinary ndarray is
converted to a MaskedArray, following the pattern already used in
mean and var in this module.
|
|/
|
|
|
| |
Adapted from the problem reported at
https://github.com/numpy/numpy/pull/21977#issuecomment-1186082534
|
| |
|
|
|
|
|
| |
This test makes sure that a MaskedArray defers properly to another
class if it doesn't know how to handle it. See #15200.
|
|
|
|
|
|
| |
This enables any ufunc numpy operations that are called on a
MaskedArray to use the masked version of that function automatically
without needing to resort to np.ma.func() calls.
|
| |
|
|
|
|
|
| |
This test makes sure that a MaskedArray defers properly to another
class if it doesn't know how to handle it. See #15200.
|
|
|
|
|
|
| |
This enables any ufunc numpy operations that are called on a
MaskedArray to use the masked version of that function automatically
without needing to resort to np.ma.func() calls.
|
|
|
|
|
|
|
|
|
| |
(#21851)
The keepdims flag needs to be applied during the calculation of the sum of
the weights in np.average and np.ma.average. Not passing it causes weights
to broadcast incorrectly.
Fixes #21850
|
|
|
|
|
|
|
|
|
|
| |
This defines the comparison operators (other than `==` and `!=`)
explicitly for masked arrays.
The mask is ignored for the resuling `res._data` (unlike `==` and
`!=` which take the mask into account.
Closes gh-21770, although the way that masked arrays propagate the
fill-value seems generally broken and error prone.
|
| |
|
| |
|
|\
| |
| | |
BUG: change `ma.mean` dtype to be consistent with `np.mean`
|
| | |
|
|\ \
| | |
| | | |
MAINT: Fortify masked in-place ops against promotion warnings
|
| | |
| | |
| | |
| | |
| | | |
There is no point in catching the warnigns when raising will do
(because we want 0 warnings). That is more informative in any case.
|
| | |
| | |
| | |
| | |
| | |
| | | |
These warnings are probably optional in the future. They should
not matter much (since the following is an in-place op), but
the `np.where` could upcast currently!
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
The test used unintialized values, if NaN happened to be there
the test would fail (and generally, uninitialized values being used
in tests is bad, since it shows up in valgrind).
|
|\ \
| | |
| | | |
ENH: add ndenumerate specialization for masked arrays
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
This is a follow-up to gh-21485.
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
`np.ma.masked_all` uses `np.empty` under the hood, so the parameter
description for shape in `masked_all` should be updated to match
that of `np.empty`.
Relevant issue: #21203
|
| | |
|
| |
| |
| | |
The first line of the docstring for `flatnotmasked_contiguous` was identical to that in `notmasked_contiguous` and refered to a given axis despite the fact that no axis is given as an argument.
|
| | |
|
| |
| |
| |
| |
| | |
This helps subclasses, who can now do super() in their own
implementation.
|
|\ \
| | |
| | | |
BUG: fix `ma.average` not working well with `nan` weights
|