summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | BUG: quantile discrete methods ended up using -1 as index sometimesSebastian Berg2021-11-122-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, the closest-observation did not correctly support multiple quantiles calculated at the same time (broadcasting error).
* | | | | | API,DEP: Rename percentile/quantile `interpolation=` to `method=`Sebastian Berg2021-11-124-162/+226
| |_|/ / / |/| | | |
* | | | | TST: Add test for max ulp in default quantile calculationabel2021-11-091-0/+8
| | | | |
* | | | | MTH: Update quantile default lerp methodabel2021-11-091-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For method 7 of H&F, using `(n - 1) * quantiles` instead of the usual method gives a more accurate result.
* | | | | DOC: Remove non-existent aliasabel2021-11-083-13/+10
| | | | |
* | | | | Merge pull request #18203 from anntzer/fqSebastian Berg2021-11-051-1/+2
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Speedup np.quantile.
| * | | | | PERF: Speedup np.quantile.Antony Lee2021-11-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoiding the unnecessary calls to moveaxis() speed up `np.quantile(x, .5)` (`x = np.random.rand(1000)`) by ~10% (although there's a lot of variability) for me.
* | | | | | MAINT: Add annotations for a missing `percentile` interpolation kind: ↵Bas van Beek2021-11-051-0/+1
|/ / / / / | | | | | | | | | | | | | | | `"inclusive"`
* | | | | DOC: Refer to the quantile/percentile notes for nan versionsSebastian Berg2021-11-042-201/+4
| | | | |
* | | | | MAINT: Remove unnecessary import of _QuantileInterpolationSebastian Berg2021-11-041-1/+0
| | | | |
* | | | | TST: Make use of clongdouble and longdoubleabel2021-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | On some platforms float128 and complex256 do not exist. Using (c)longdouble aliases should work on all platforms.
* | | | | DOC: Update _InterpolationKindabel2021-11-041-1/+9
| | | | |
* | | | | TST: Add parametrize for interpolation methodsabel2021-11-041-91/+43
| | | | |
* | | | | TST: Add extrapolation testsabel2021-11-041-0/+9
| | | | |
* | | | | MAINT: Clean following PR commentsabel2021-11-042-17/+7
| | | | |
* | | | | Fix issue with nan scalarabel2021-11-042-2/+8
| | | | | | | | | | | | | | | | | | | | Also added unit test for it.
* | | | | DOC: Improve quantile documentationabel2021-11-041-20/+67
| | | | | | | | | | | | | | | | | | | | Also removed unused imports
* | | | | Fix _lerpabel2021-11-042-30/+26
| | | | | | | | | | | | | | | | | | | | | | | | | - some changes were unrelated to the PR and have been reverted, including, renaming and moving the logic around. - Also renamed _quantile_ureduce_func to its original name
* | | | | DOC: fix docstrings.Charles Harris2021-11-042-325/+523
| | | | | | | | | | | | | | | | | | | | | | | | | Hopefully fix the docstrings of percentile, nanpercentile, quantile, and nanquantile so that CircleCI passes.
* | | | | MAINT, ENH [#10736] Add interpolation methods to quantileabel2021-11-043-194/+788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* | | | | DOC: Do not leave space between directive name and double colon.Matthias Bussonnier2021-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From my regular expression foo, those are the only 9 case whereas there are about ~2000 usage that do not have spaces. While this is ok with docutils/sphinx, it does not seem to be documented, and that means that other parsers will see that as comments, leading to for example improper syntax highlighting. This make it also a tiny bit harder to develop alternative rst parsers.
* | | | | ENH: Check that the lengths of the inputs to histogram2d are the same. (#20228)Jérome Eertmans2021-11-022-0/+13
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Improves exception message when inputs have different shapes. Closes gh-20050 Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | | | Merge remote-tracking branch 'upstream/main' into better-select-exampleJonas Liechti2021-10-2513-176/+1488
|\ \ \ \
| * \ \ \ Merge pull request #20071 from alessiamarcolini/refactorCharles Harris2021-10-225-8/+2
| |\ \ \ \ | | | | | | | | | | | | MAINT: Remove unused imports and remove duplicated tests
| | * | | | MAINT: remove unused importsAlessia Marcolini2021-10-085-8/+2
| | | | | |
| * | | | | BUG: lib: Fix error raised by insert.warren2021-10-202-3/+7
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `insert` is given a single out-of-bounds index in a list, e.g. np.insert([0, 1, 2], [99], [3, 4]) # 99 is out of bounds a TypeError was being raised because of a bug in the formatting of the message. Before this change, the error is TypeError: %i format: a number is required, not list After, we get the expected IndexError: index [99] is out of bounds for axis 0 with size 3
| * | | | Add note to iterable docstring about 0d arrays.Ross Barnowski2021-10-151-0/+13
| | |_|/ | |/| | | | | | | | | | Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
| * | | Merge pull request #20059 from DimitriPapadopoulos/lgtm_recommendationsCharles Harris2021-10-101-1/+1
| |\ \ \ | | | | | | | | | | MAINT: LGTM.com recommendations
| | * | | MAINT: LGTM.com recommendation: Unused importDimitri Papadopoulos2021-10-071-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | Import of 'histogram' is not used. Import of 'histogramdd' is not used. Import of 'textwrap' is not used.
| * | | Merge pull request #20047 from sistaseetaram/flag-writeable-upon-copyMatti Picus2021-10-101-0/+11
| |\ \ \ | | | | | | | | | | DOC:add an example to show flag writeable cleared upon copy related to #20035
| | * | | added-suggestion-to#20047Sista Seetaram2021-10-061-1/+4
| | | | |
| | * | | DOC:add an example to show flag writeable cleared upon copySista Seetaram2021-10-061-0/+8
| | |/ /
| * | | Merge pull request #20061 from DimitriPapadopoulos/python3Matti Picus2021-10-101-2/+1
| |\ \ \ | | | | | | | | | | DOC: Remove references to Python 2
| | * | | DOC: Remove references to Python 2Dimitri Papadopoulos2021-10-071-2/+1
| | |/ /
| * | | Merge pull request #20063 from BvB93/histogramsCharles Harris2021-10-091-4/+48
| |\ \ \ | | | | | | | | | | ENH: Add annotations for `np.lib.histograms`
| | * | | ENH: Add annotations for `np.lib.histograms`Bas van Beek2021-10-071-4/+48
| | |/ /
| * | | ENH: Add annotations for `np.lib.polynomial`Bas van Beek2021-10-071-11/+297
| |/ /
| * | ENH: Add annotations for `np.lib.function_base` part 3Bas van Beek2021-10-051-10/+202
| | |
| * | Merge pull request #20034 from BvB93/function-base2Charles Harris2021-10-041-13/+188
| |\ \ | | | | | | | | ENH: Add annotations for `np.lib.function_base` part 2/3
| | * | ENH: Add more annotations for `np.lib.function_base`Bas van Beek2021-10-041-13/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * `interp` * `cov` * `corrcoef` * `blackman` * `bartlett` * `hanning` * `hamming` * `i0` * `kaiser` * `sinc` * `msort` * `median`
| * | | Merge pull request #20027 from BvB93/nanfuncCharles Harris2021-10-043-85/+326
| |\ \ \ | | |/ / | |/| | ENH: Add missing parameters to the `nan<x>` functions
| | * | TST: Add tests for the new `nan<x>` function parametersBas van Beek2021-10-041-0/+103
| | | |
| | * | TST: Add a test for comparing the signatures of `nan<x>` and `<x>` functionsBas van Beek2021-10-041-0/+48
| | | |
| | * | ENH: Update (and simplify) the `nan<x>` function annotationsBas van Beek2021-10-041-50/+36
| | | |
| | * | 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
| * | | Merge pull request #20008 from BvB93/window-funcCharles Harris2021-10-042-22/+103
| |\ \ \ | | | | | | | | | | BUG: Fix the `lib.function_base` window functions ignoring extended precision float dtypes
| | * | | STY: Directly use a float rather than the `float64` constructorBas van Beek2021-10-041-1/+1
| | | | |
| | * | | TST: Add more tests for `np.kaiser`Bas van Beek2021-09-301-0/+21
| | | | |
| | * | | BUG: Fix the `lib.function_base` window functions ignoring extended ↵Bas van Beek2021-09-302-22/+82
| | |/ / | | | | | | | | | | | | precision float dtypes
| * | | MAINT: Remove `slice` from the accepted `np.place` mask-typesBas van Beek2021-10-011-1/+1
| | | | | | | | | | | | | | | | `np.place` uses the `np.core.multiarray._insert` function under the hood, not to be confused with `np.insert` (which does accept slices)