summaryrefslogtreecommitdiff
path: root/numpy/ma
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: move `mask_rowcols` to `ma/extras.py`yuki2023-03-252-93/+90
|
* ENH: revert changes of `mask_rowcols`yuki2023-03-221-8/+12
|
* ENH: fix formatyuki2023-03-221-12/+24
|
* Merge branch 'main' into enh-ma-dotyuki2023-03-227-12/+22
|\
| * Merge pull request #23335 from tylerjereddy/treddy_issue_22041Marten van Kerkwijk2023-03-062-1/+7
| |\ | | | | | | BUG: ma with structured dtype
| | * BUG: ma with structured dtypeTyler Reddy2023-03-032-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #22041 * add regression test and fix for creating a masked array with a structured dtype; the test is simply for lack of error in the repoducer * the concern expressed by core team in matching issue was that `astropy` might be negatively affected; I ran full `astropy` (hash: `c9ad7c56`) test suite locally with this feature branch and it seemed "ok," just 1 unrelated network failure in the network-requiring tests (`test_ftp_tls_auto`): ```1 failed, 21430 passed, 3490 skipped, 176 xfailed, 23275 warnings in 430.18s (0:07:10)```
| * | Add type annotations for comparison operators to MaskedArray.Peter Hawkins2023-03-031-0/+4
| |/ | | | | | | | | | | | | | | The comparison operators seem to be missing annotations; whereas pretty much every other operator is annotated. This causes pytype to conclude that the output of, say, __gt__ is a regular ndarray, which isn't true.
| * DEP: deprecate `product`, `cumproduct`, `sometrue`, `alltrue`Ralf Gommers2023-03-024-11/+11
| | | | | | | | [skip cirrus]
* | add support for non-2d arraysyuki2023-03-032-25/+65
|/
* DEP: deprecate `np.round_`Ralf Gommers2023-02-281-2/+2
| | | | Closes gh-22617
* BUG: PR 23269 revisionsTyler Reddy2023-02-252-1/+9
| | | | | * handle 0-D masked object array deepcopies, with regression test, based on reviewer feedback
* MAINT: PR 23269 revisionsTyler Reddy2023-02-242-1/+4
| | | | | * the deepcopy of masked array object type now also includes the components beyond just `_data`; add a related test case
* MAINT: PR 23269 revisionsTyler Reddy2023-02-242-3/+16
| | | | | | | | | | | | | | * guard masked array `__deepcopy__` special object handling behind `dtype.hasobject`, based on reviewer feedback * masked array `__deepcopy__` for object type handling now deepcopies from `self._data` directly, based on reviewer feedback * add a test case for 2D masked array object deepcopies, since reviewer was not convinced this was working
* BUG: masked array proper deepcopiesTyler Reddy2023-02-232-1/+34
| | | | | | | | | | | | | | | | | Fixes #22556 Fixes #21022 * add regression test and fix for gh-22556, where we were relying on the array `copy` arg to deepcopy a compound object type; I thought about performance issues here, but if you are already in the land of `object` and you are explicitly opting in to `deepcopy`, it seems like performance might be wishful thinking anyway * add regression test and fix for gh-21022--this one was weirder but seems possible to sidestep by not trying to assign a shape of `()` to something that already has shape `()` and a non-writeable `shape` attribute
* Merge pull request #23113 from hmaarrfk/slots_for_mixinsSebastian Berg2023-01-271-0/+10
|\ | | | | ENH: Add slots to NDArrayOperatorsMixin allowing them in subclasses
| * TST: Add a test for slots and NDArrayOperatorsMixin subclassingMark Harfouche2023-01-271-0/+10
| |
* | 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
| |