summaryrefslogtreecommitdiff
path: root/numpy/ma
Commit message (Collapse)AuthorAgeFilesLines
* BUG: fix ma.diff not preserving mask when using append/prepend (#22776)Marko Pacak2023-01-193-7/+176
| | | | | Port CORE diff relevant code to MA and adapt docstrings examples and add tsts. Closes gh-22465
* DOC: Add example for np.ma.diag (#22960)Stefanie Molin2023-01-161-0/+32
| | | | | | | * DOC: Add example for np.ma.diag as part of numpy#22269 * Add descriptions to example. * Fix typo.
* MAINT: restore npymath implementations needed for freebsdmattip2022-12-251-0/+2
|
* API: Ensure a full mask is returned for masked_invalidSebastian Berg2022-12-212-1/+18
| | | | | | | | Matplotlib relies on this, so we don't seem to have much of a choice. I am surprised that we were not notified of the issue before release time. Closes gh-22720, gh-22720
* BUG: Do not use getdata() in np.ma.masked_invalidSebastian Berg2022-12-192-5/+19
| | | | | | | | | | | | This is the minimal solution to fix gh-22826 with as little change as possible. We should fix `getdata()` but I don't want to do that in a bug-fix release really. IMO the alternative is to revert gh-22046 which would also revert the behavior noticed in gh-22720 (which seems less harmful though). Closes gh-22826
* Merge pull request #22721 from byrdie/bugfix/median-keepdims-outSebastian Berg2022-12-062-5/+30
|\ | | | | BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median`.
| * BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median()`, ↵Roy Smart2022-12-052-5/+30
| | | | | | | | | | | | `numpy.percentile()`, and `numpy.quantile()`. Closes #22714, #22544.
* | Merge pull request #22731 from HaoZeke/maBenchCleanupMatti Picus2022-12-051-130/+0
|\ \ | |/ |/| BENCH: Update MaskedArray Benchmarks
| * MAINT: Kill old hand-written benchmarksRohit Goswami2022-12-051-130/+0
| |
* | ENH: Speedup masked array creation when mask=None (#22725)Lefteris Loukas2022-12-052-1/+9
|/ | | | | | | This PR Closes gh-17046. The problem was that when calling mask=None, the array creation took seconds compared to the microseconds needed when calling mask=False. Using `mask=None` is a bit dubious, since it has a different meaning from the default `mask=nomask`, but the speed trap is so hard to find, that it seems pragmatic to support it. OTOH, it also would seem fine to deprecate the whole path (or maybe see if the path can be sped up so that the speed difference isn't forbidding eough to bother).
* Merge pull request #22436 from cmarmo/doc-masked-equalSebastian Berg2022-11-211-17/+11
|\ | | | | DOC: Clarify docstring of `masked_equal` and `masked_values`
| * Update numpy/ma/core.pySebastian Berg2022-11-211-3/+1
| |
| * Address reviewer comment.Chiara Marmo2022-10-171-2/+4
| |
| * Clarify docstring of masked_valuesChiara Marmo2022-10-131-14/+8
| |
* | DOC: Add example for np.ma.power as part of #22269Stefanie Molin2022-11-191-0/+26
| |
* | Merge pull request #21895 from hoodmane/emscripten-ciRalf Gommers2022-11-151-1/+2
|\ \ | | | | | | ENH, CI: Add Emscripten to CI
| * | TST: Skip tests that are not currently supported in wasmHood Chatham2022-11-111-1/+2
| | |
* | | TYP,DEP: Remove all reference to the removed `MaskedArray.mini` methodBvB932022-11-141-1/+0
|/ / | | | | | | Xref https://github.com/numpy/numpy/pull/22228
* | STY: Make linter happySebastian Berg2022-10-271-3/+2
| | | | | | | | Not new things, but in touched lines...
* | TST,MAINT: Replace most `setup` with `setup_method` (also teardown)Sebastian Berg2022-10-275-40/+41
| | | | | | | | | | | | | | | | In some cases, the replacement is clearly not what is intended, in those (where setup was called explicitly), I mostly renamed `setup` to `_setup`. The `test_ccompile_opt` is a bit confusing, so left it right now (this will probably fail)
* | MAINT: remove u-prefix for former Unicode strings (#22479)Mike Taves2022-10-263-5/+5
|/
* Merge pull request #22385 from seberg/deprecate-out-of-bound-pyint-conversionMatti Picus2022-10-111-1/+7
|\ | | | | DEP: Deprecate conversion of out-of-bound Python integers
| * MAINT: Structured MA fill value workaround by adding array castSebastian Berg2022-10-051-1/+7
| | | | | | | | | | | | | | | | | | | | This wraps the fill value into an array, the default fill value for all ointegers is 99999 which doesn't work for many integer dtypes. Note that this might still subtle change the behavior in other code paths where we cannot avoid this. Plus, the deprecationwarning may show up (and in fact be a "in the future will use the default fill value" warning).
* | DOC: added `ma.round` and `ma.round_` examples (#22404)Felix Hirwa Nshuti2022-10-111-0/+22
| | | | | | | | This PR is partially addressing #22269 Added examples for ma.round and ma.round_
* | Merge pull request #22046 from cmarmo/masked-invalidSebastian Berg2022-10-052-13/+13
|\ \ | | | | | | BUG: Make `mask_invalid` consistent with `mask_where` if `copy` is set to `False`
| * | Remove try statement. Add test.Chiara Marmo2022-09-072-4/+5
| | |
| * | Fix lint.Chiara Marmo2022-07-251-1/+2
| | |
| * | Make mask_invalid consistent with mask_where when copy is set to False. Add ↵Chiara Marmo2022-07-252-13/+11
| | | | | | | | | | | | test for type erroring.
* | | Added ma.min examplesFelix Hirwa Nshuti2022-10-011-1/+1
| | |
* | | Added ma.min examplesFelix Hirwa Nshuti2022-10-011-0/+30
| |/ |/|
* | DOC: Adding examples to `ma.max` function (#22331)Felix Hirwa Nshuti2022-09-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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: Import ``numpy.ma`` at beginning of examples.Charles Harris2022-09-171-0/+1
| |
* | DOC: add example for ma.unique functionswagatip2022-09-161-0/+25
| |
* | Remove long deprecated functionality from np.maBrigitta Sipőcz2022-09-082-87/+2
| |
* | Merge pull request #21995 from eirrgang/mei-1468Matti Picus2022-09-071-1/+1
|\ \ | |/ |/| BUG: Distinguish exact vs. equivalent dtype for C type aliases.
| * Don't regenerate the descriptor unnecessarily.M. Eric Irrgang2022-07-161-1/+1
| | | | | | | | | | Fix a false mismatch. Separate dtype objects, even if equivalent, cause distinct array views to be created.
* | Revert "TST: add a test for ma.minimum.reduce with axis keyword"mattip2022-07-201-12/+0
| | | | | | | | This reverts commit e2efced9bdfc773f5aca2487f12ab1cb2bd11833.
* | Revert "BUG: Fix masked median multiple masked arrays (#21999)"mattip2022-07-202-23/+1
| | | | | | | | This reverts commit 6b8d55e66e532d66e1701ad039b4cda306839b3f.
* | Revert "ENH: Adding __array_ufunc__ capability to MaskedArrays."mattip2022-07-203-194/+47
| | | | | | | | This reverts commit 8cd6f4ca00b6e0da3833fc267d50067b2ddbc069.
* | Revert "nomask in nomask out" from 21977mattip2022-07-201-2/+2
| | | | | | | | This reverts commit db1a98bf194771a677dbc0c2e06bc47f4a9947a8.
* | Revert "BUG: fix ma.minimum.reduce with axis keyword"mattip2022-07-201-2/+0
| | | | | | | | This reverts commit b8c6d09208ecb7f0d83a8b06ab9e15e720f03730.
* | BUG: Fix masked median multiple masked arrays (#21999)Brigitta Sipőcz2022-07-172-1/+23
| | | | | | | | | | | | | | 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>
* | BUG: fix ma.minimum.reduce with axis keywordRuth Comer2022-07-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* | TST: add a test for ma.minimum.reduce with axis keywordRuth Comer2022-07-161-0/+12
|/ | | | | Adapted from the problem reported at https://github.com/numpy/numpy/pull/21977#issuecomment-1186082534
* nomask in nomask outRuth Comer2022-07-131-2/+2
|
* TST: Adding a test that MaskedArrays respect ufunc deferral heirarchyGreg Lucas2022-07-131-0/+64
| | | | | This test makes sure that a MaskedArray defers properly to another class if it doesn't know how to handle it. See #15200.
* ENH: Adding __array_ufunc__ capability to MaskedArrays.Greg Lucas2022-07-133-47/+194
| | | | | | 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.
* Revert "ENH: Adding __array_ufunc__ capability to MaskedArrays"Matti Picus2022-07-094-253/+47
|
* TST: Adding a test that MaskedArrays respect ufunc deferral heirarchyGreg Lucas2022-06-291-0/+59
| | | | | This test makes sure that a MaskedArray defers properly to another class if it doesn't know how to handle it. See #15200.
* ENH: Adding __array_ufunc__ capability to MaskedArrays.Greg Lucas2022-06-293-47/+194
| | | | | | 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.