summaryrefslogtreecommitdiff
path: root/numpy/lib/nanfunctions.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC quantile q is a probabilityChristian Lorentzen2023-04-041-4/+4
|
* MAINT: Fix stacklevels for the new C dispatcher not adding oneSebastian Berg2023-01-171-8/+8
|
* BUG: Quantile function on complex number now throws an error (#22652) (#22703)Matteo Raso2022-12-081-0/+7
| | | | | | | | | | | | | | | | | Since percentile is more or less identical to quantile, I also made it throw an error if it receives a complex input. I also made nanquantile and nanpercentile throw errors as well. * Made the changes recommended by seberg * Fixed a test for PR 22703 * Fixed tests for quantile * Shortened some more lines * Fixup more lines Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
* BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median()`, ↵Roy Smart2022-12-051-10/+4
| | | | | | `numpy.percentile()`, and `numpy.quantile()`. Closes #22714, #22544.
* DOC: fixed two more typos in docstringsGaëtan de Menten2022-09-281-2/+2
| | | nanpercentile and nanquantile had the same typo I just fixed in percentile
* MAINT, DOC: discard repeated wordsDimitri Papadopoulos2022-01-131-3/+2
|
* DOC: Update percentile/quantile docsSebastian Berg2021-11-121-30/+42
| | | | | | | Mainly fixes the method list slightly, tones down the warning a bit and fixes the link to the paper (I did not realize that the link failed to work due only because the reference was missing from nanquantile/nanpercentile).
* DOC: Remove reference to paper from quantile `method` kwargSebastian Berg2021-11-121-2/+2
| | | | | Apparently, sphinx does not resolve references to footnotes from parameter descriptions.
* API,DEP: Rename percentile/quantile `interpolation=` to `method=`Sebastian Berg2021-11-121-41/+68
|
* DOC: Remove non-existent aliasabel2021-11-081-4/+4
|
* DOC: Refer to the quantile/percentile notes for nan versionsSebastian Berg2021-11-041-200/+3
|
* MAINT: Remove unnecessary import of _QuantileInterpolationSebastian Berg2021-11-041-1/+0
|
* MAINT: Clean following PR commentsabel2021-11-041-11/+4
|
* DOC: fix docstrings.Charles Harris2021-11-041-156/+268
| | | | | Hopefully fix the docstrings of percentile, nanpercentile, quantile, and nanquantile so that CircleCI passes.
* MAINT, ENH [#10736] Add interpolation methods to quantileabel2021-11-041-34/+178
| | | | | | | | | | - Added the missing linear interpolation methods. - Updated the existing unit tests. - Added pytest.mark.xfail for boolean arrays See - https://github.com/numpy/numpy/pull/19857#issuecomment-919258693 - https://github.com/numpy/numpy/issues/19154
* ENH: Bring the `nan<x>` signatures up to parity with their `<x>`-based ↵Bas van Beek2021-10-041-35/+139
| | | | | | | | | | | | | | counterparts * nanmin: initial & where * nanmax: initial & where * nanargmin: keepdims & out * nanargmax: keepdims & out * nansum: initial & where * nanprod: initial & where * nanmean: where * nanvar: where * nanstd: where
* DOC: Typos found by codespellDimitri Papadopoulos2021-09-211-1/+1
|
* BUG: Fixed an issue wherein `nanpercentile` and `nanquantile` would ignore ↵Bas van Beek2021-09-111-1/+2
| | | | the dtype for all-nan arrays
* MAINT: Let `_remove_nan_1d` attempt to identify nan-containing object arraysBas van Beek2021-09-051-2/+4
| | | | Use the same approach as in numpy/numpy#9013
* MAINT: Copy the `_methods._std` code-path for handling `nanstd` object-arraysBas van Beek2021-09-041-6/+3
| | | | https://github.com/numpy/numpy/blob/410a89ef04a2d3c50dd2dba2ad403c872c3745ac/numpy/core/_methods.py#L265-L270
* BUG: Fixed an issue wherein certain `nan<x>` functions could fail for object ↵Bas van Beek2021-09-031-3/+20
| | | | arrays
* MAINT: Directly grab `nan` from the input arrayBas van Beek2021-05-221-5/+7
| | | | Directly grab a nan-esque object from the input array, rather than constructing a new one from scratch
* BUG: Fixed an issue wherein `_nanmedian_small` would fail for ↵Bas van Beek2021-05-221-2/+4
| | | | `timedelta64`-based dtypes
* BUG: Fixed an issue wherein `nanmedian` could return an array with the wrong ↵Bas van Beek2021-05-221-1/+3
| | | | dtype
* DOC: Nupydoc format space before `:` in ParametersMatthias Bussonnier2021-01-311-1/+1
| | | | Missing `s` in two spellings.
* Fix docstring cross-referencingAlbert Villanova del Moral2020-09-041-9/+9
|
* 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.
* PERF: only copy input array in _replace_nan() if there are nans to replaceChristopher Whelan2019-12-021-1/+2
|
* ENH: add OO->? loops, use np.compare(a, b, dtype=bool), add commentsmattip2019-10-301-1/+1
|
* WIP, DEP, ENH: finish richcompare changes from 1.10mattip2019-10-291-1/+1
|
* DOC: fix output argument referencemattip2019-10-151-15/+15
|
* DOC: Fixed dtype docs for var, nanvar.Isaac Virshup2019-08-271-1/+1
| | | | | | | | | Docs incorrectly stated that the default output dtype was float32 when input array is of an integer dtype. However: ```python np.var(np.random.randint(0, 100, 1000)).dtype == np.dtype("f8") ```
* Update nanfunctions.pyHe Jia2019-06-141-0/+1
|
* BUG: Increment stacklevel for warnings to account for NEP-18 overrides (#13589)Stephan Hoyer2019-05-201-9/+16
| | | | | | | | | | | | | | * Increment stacklevel for warnings to account for NEP-18 overrides For NumPy functions that make use of `__array_function__`, the appropriate the stack level for warnings should generally be increased by 1 to account for the override function defined in numpy.core.overrides. Fixes GH-13329 * Update numpy/lib/type_check.py Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* ENH: add _nan_mask functionTyler Reddy2019-01-181-0/+27
| | | | | | | | | * add _nan_mask function and associated unit tests; this function is to be used to simplify reduction operations involving np.nan elements by using a mask with a ``where`` argument
* MAINT: address several reviewer commentsTyler Reddy2018-12-141-2/+2
|
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-49/+52
| | | | | | | | * 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: set preferred __module__ for numpy functionsStephan Hoyer2018-10-231-1/+6
|
* ENH: __array_function__ for np.lib, part 1Stephan Hoyer2018-10-081-0/+76
| | | | np.lib.arraypad through np.lib.nanfunctions
* DOC: reduce warnings and cleanup redundant c-api documentationmattip2018-08-141-7/+9
|
* Merge pull request #10199 from chunweiyuan/quantileStephan Hoyer2018-04-231-2/+108
|\ | | | | ENH: Quantile
| * ENH: Adding np.quantile() and np.nanquantile(). #10199Chun-Wei Yuan2018-04-161-2/+108
| |
* | DOC: clear up warnings, fix matplotlib plotmattip2018-04-171-7/+8
|/
* DOC: Fix type of axis in nanfunctions (#10421)Tobias Fischer2018-02-031-14/+14
|
* MAINT: Avoid repeated validation of percentiles in nanpercentileEric Wieser2017-12-181-18/+27
| | | | | | Previously, this would check the percentiles were 0 <= q <= 100 on every single slice of non-reduction axes. This also pulls the division by 100 to the top level, which makes things clearer, and also reduces the size of the stack trace
* DOC: give correct version of np.nansum changeMatthew Brett2017-12-191-1/+1
| | | | | | | nansum started returning 0 from all-nan slices in 1.9.0, according to my tests, not 1.8.1 or 1.8.2, which still return NaN. [skip ci]
* DOC: Fixup percentile docstring, from review in gh-9213Eric Wieser2017-12-101-19/+14
| | | | Updates the two docstrings to match.
* Make warnings for nanmin and nanmax consistentErik Quaeghebeur2017-10-231-1/+1
|
* DOX: Fix mistaken word in nanprod docstring (#9703)Robert T. McGibbon2017-09-171-1/+1
|
* MAINT: Use moveaxis instead of rollaxis internally (#9475)Nico Schlömer2017-08-101-1/+1
| | | | | Also add a hint to the documentation advising the use of moveaxis over rollaxis. Tests for rollaxis are left alone.