summaryrefslogtreecommitdiff
path: root/numpy/ma/extras.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: move `mask_rowcols` to `ma/extras.py`yuki2023-03-251-2/+90
|
* DEP: deprecate `product`, `cumproduct`, `sometrue`, `alltrue`Ralf Gommers2023-03-021-2/+2
| | | | [skip cirrus]
* BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median()`, ↵Roy Smart2022-12-051-5/+1
| | | | | | `numpy.percentile()`, and `numpy.quantile()`. Closes #22714, #22544.
* 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
|
* Revert "BUG: Fix masked median multiple masked arrays (#21999)"mattip2022-07-201-4/+1
| | | | This reverts commit 6b8d55e66e532d66e1701ad039b4cda306839b3f.
* Revert "ENH: Adding __array_ufunc__ capability to MaskedArrays."mattip2022-07-201-12/+5
| | | | This reverts commit 8cd6f4ca00b6e0da3833fc267d50067b2ddbc069.
* BUG: Fix masked median multiple masked arrays (#21999)Brigitta Sipőcz2022-07-171-1/+4
| | | | | | | 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>
* ENH: Adding __array_ufunc__ capability to MaskedArrays.Greg Lucas2022-07-131-5/+12
| | | | | | 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-091-12/+5
|
* ENH: Adding __array_ufunc__ capability to MaskedArrays.Greg Lucas2022-06-291-5/+12
| | | | | | 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.
* BUG: Use `keepdims` during normalization in `np.average` and `np.ma.average` ↵Srimukh Sripada2022-06-261-1/+1
| | | | | | | | | (#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
* Fix some typos.Yulv-git2022-05-141-1/+1
|
* Merge pull request #20020 from joukewitteveen/ma-ndenumerateMatti Picus2022-05-111-6/+74
|\ | | | | ENH: add ndenumerate specialization for masked arrays
| * ENH: Add compressed= argument to ma.ndenumerateJouke Witteveen2022-05-101-6/+28
| |
| * Update numpy/ma/extras.pyMatti Picus2022-04-221-1/+2
| |
| * ENH: add ndenumerate specialization for masked arraysJouke Witteveen2022-04-221-6/+51
| |
* | ENH: Add 'keepdims' to 'average()' and 'ma.average()'.warren2022-05-091-3/+36
|/
* DOC: fix data type of parameter shape (#21251)Pax2022-03-261-2/+2
| | | | | | | `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
* DOC: fix input parameter type in docstring.Ross Barnowski2022-01-271-1/+1
|
* DOC: fix np.ma.flatnotmasked_contiguous docstringstephenworsley2022-01-271-1/+1
| | | 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.
* BUG: fix `ma.average` not working well with nan weightsIvan Gonzalez2021-12-021-1/+2
| | | | If a weight is nan it behaves erratically. See the tests added.
* MAINT: remove unused argument in private functionMarten van Kerkwijk2021-09-141-2/+2
|
* MAINT: Remove unused imports and unreachable code (#18762)Elisha Hollander2021-07-071-1/+0
| | | * Remove unnecessary imports and minor fixes
* MAINT: removed unused imports listed in LGTMdefault-3032021-05-241-1/+0
|
* BUG: fixed ma.average ignoring masked weights (#18960)Laura Martens2021-05-121-1/+1
| | | | | Closes #10438 Co-authored-by: mecopur <mecopur@outlook.com>
* MAINT: use super() as described by PEP 3135Mike Taves2021-03-191-2/+2
|
* DOC: more mist fixes of syntax.Matthias Bussonnier2021-01-281-1/+1
| | | | | Space before colon, or missing colon in see-also, typo in parameter names, casing in See Also.
* DOC: Avoid using "set of" when talking about an ordered list.Antony Lee2020-12-291-1/+1
| | | | | | | | | | | | ... or when the input isn't/cannot be a set. I left a few usages, e.g. in random sampling, where "set" is reasonable as informal description of an array as the order doesn't matter; however, for e.g. np.gradient the order of the returned list is clearly important, so "set" is wrong. Also some other minor doc edits noticed during the grepping: using `shape` instead of `form` in `cov` is consistent with most other places; the wording in `Polynomial.trim` now matches other methods on the same class.
* DOC: Fixing references in ma docstrings (#16300)Takanori H2020-10-071-4/+4
| | | Fix broken links in see also section of some ma functions.
* DOC: Fix syntax errors in docstrings for versionchanged, versionadded (#17338)Bradley Dice2020-09-171-1/+1
| | | * DOC: Fix typos in versionchanged.
* DOC: Fix malformed docstrings in ma. (#16296)Takanori H2020-06-111-8/+3
| | | | | | * DOC: fixing malformed documents Co-authored-by: Ross Barnowski <rossbar@berkeley.edu> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* DOC: Add missing bracket (gh-16051)Chunlin2020-04-251-1/+1
| | | Add missing closing brackets, script to generate the list in the PR gh-16051.
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* DEP: Deprecate the axis argument to masked_rows and masked_colsEric Wieser2019-12-021-2/+14
| | | | | This argument isn't used, and is confusing. (Small test added by seberg)
* DOC: convert `None` to bare None or ``None``mattip2019-10-151-1/+1
|
* DOC: lib: Add more explanation of the weighted average calculation.Warren Weckesser2019-08-261-2/+5
| | | | | Also removed the incorrect comment from the docstring of `numpy.ma.average` about the imaginary part of `weights` being ignored.
* DOC: fix some more See Also issuesRalf Gommers2019-04-141-6/+6
| | | | These ones just generated warnings, not build failures
* DEV: cleanup imports and some assignments (from LGTM)mattip2019-03-171-1/+0
|
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-122/+137
| | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
* MAINT: rewrite np.ma.(median|sort) to use take_along_axisEric Wieser2018-05-251-24/+12
|
* MAINT: move all masked array matrix tests to matrixlib.Marten van Kerkwijk2018-04-271-3/+8
| | | | | | 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.
* BUG: Always return a list from np.ma.flatnotmasked_contiguousEric Wieser2018-03-251-13/+37
| | | | | | | | | | | | | 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.
* MAINT: Stop using non-tuple indices internallyEric Wieser2018-02-161-1/+2
| | | | | | 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
* BUG: concatenation using axis=None in union1dAnas Khan2018-01-091-1/+1
|
* BUG: arrays not being flattened in `union1d`Anas Khan2018-01-081-1/+1
|
* ENH: added masked version of 'numpy.stack' with tests.lzkelley2017-12-171-1/+2
| | | | | Uses '_fromnxfunction_seq' just like 'vstack', 'hstack', etc. Added release note to 1.15.0.
* MAINT/DOC: Use builtin when np.{x} is builtins.{x}.Eric Wieser2017-08-051-2/+2
| | | | | | | 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
* MAINT: Use new-style classes on 2.7Eric Wieser2017-07-241-1/+1
| | | | Deliberately avoids tests, to prevent introducing a failure on old-style classes later.