summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* | ENH: Add annotations for `np.lib.function_base`Bas van Beek2021-09-301-18/+290
|/
* ENH: Add spaces after punctuation in dtype repr/str. (#19686)Antony Lee2021-09-291-1/+2
| | | | | | | | | | | | | | | | | Before: ``` In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]}) Out[1]: dtype({'names':['a'], 'formats':['<i8'], 'offsets':[2], 'itemsize':10}) ``` After: ``` In [1]: np.dtype({"names": ["a"], "formats": [int], "offsets": [2]}) Out[1]: dtype({'names': ['a'], 'formats': ['<i8'], 'offsets': [2], 'itemsize': 10}) ``` * Allow switching back to old dtype printing format. * Add changelog.
* DOC: Update links to online copy of Abramowitz and Stegun.warren2021-09-281-1/+1
|
* DOC: rename np.lib.scimath to np.emathPamphile ROY2021-09-271-11/+10
|
* Merge pull request #19949 from BvB93/recCharles Harris2021-09-241-2/+3
|\ | | | | ENH: Add annotations for `np.rec`
| * MAINT: Change the `npyio` recarray dtypes from `void` to `record`Bas van Beek2021-09-241-2/+3
| |
* | MAINT: lib: Check that the dtype given to fromregex is structured.warren2021-09-222-8/+16
|/ | | | | | | | | | In fromregex, add a check that verifies that the given dtype is a structured datatype. This avoids confusing error messages that can occur when the given data type is not structured. Also tweaked the code in the Examples section. Closes gh-8891.
* Merge pull request #19905 from Samyak2/polynomial-fit-doc-formattingCharles Harris2021-09-211-6/+12
|\ | | | | DOC: fix docstring formatting of polynomial fit method return values.
| * DOC: fix formatting of a return value of polynomial fit methodsSamyak S Sarnayak2021-09-211-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #19897 The 2nd return value of the following methods/functions were badly formatted and the list was all appearing in a single line. Changed them to separate points which are rendered nicely. - numpy.polyfit - numpy.ma.polyfit - numpy.polynomial.polynomial.polyfit - numpy.polynomial.polynomial.Polynomial.fit - numpy.polynomial.chebyshev.chebfit - numpy.polynomial.chebyshev.Chebyshev.fit - numpy.polynomial.hermite.hermfit - numpy.polynomial.hermite.Hermite.fit - numpy.polynomial.hermite_e.hermefit - numpy.polynomial.hermite_e.HermiteE.fit - numpy.polynomial.laguerre.lagfit - numpy.polynomial.laguerre.Laguerre.fit - numpy.polynomial.legendre.legfit - numpy.polynomial.legendre.Legendre.fit Also fixed erroneous links to `numpy.full` which were actually referring to the `full` argument. Changed those to code strings (double backticks) from single backticks. Also fixed formatting issues in the 3rd return value of numpy.polyfit (and hence also numpy.ma.polyfit).
* | Merge pull request #19917 from BvB93/arraysetopsCharles Harris2021-09-211-9/+332
|\ \ | | | | | | ENH: Add annotations for `np.lib.arraysetops`
| * | ENH: Add annotations for `np.lib.arraysetops`Bas van Beek2021-09-211-9/+332
| | |
* | | DOC: Add explanation of a sparse mesh grid (#19776)Tim Hoffmann2021-09-211-8/+27
| | | | | | | | | | | | | | | * Add explanation of a spare mesh grid. Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | | DOC: Typos found by codespellDimitri Papadopoulos2021-09-214-5/+5
|/ /
* | MAINT: Replace the old `_NestedSequence` union and remove `_RecursiveSequence`Bas van Beek2021-09-196-20/+18
|/
* MAINT: Improve ``_median_nancheck`` docstring.Charles Harris2021-09-141-1/+1
|
* MAINT: remove unused argument in private functionMarten van Kerkwijk2021-09-142-14/+13
|
* BUG: ensure np.median does not drop subclass for NaN result.Marten van Kerkwijk2021-09-142-8/+16
| | | | | | | | Currently, np.median is almost completely safe for subclasses, except if the result is NaN. In that case, it assumes the result is a scalar and substitutes a NaN with the right dtype. This PR fixes that, since subclasses like astropy's Quantity generally use array scalars to preserve subclass information such as the unit.
* MAINT: Make parameters match label.Charles Harris2021-09-131-1/+1
|
* TST: Fix a couple of `pytest` id labelsBas van Beek2021-09-131-3/+3
| | | | Co-Authored-By: Charles Harris <charlesr.harris@gmail.com>
* TST: Expand/rewrite the `test_allnans` testsBas van Beek2021-09-111-79/+115
| | | | Parametrize w.r.t. the axis, array dimensionality and dtype
* BUG: Fixed an issue wherein `nanpercentile` and `nanquantile` would ignore ↵Bas van Beek2021-09-111-1/+2
| | | | the dtype for all-nan arrays
* TST: Expand `TestNanFunctions_NumberTypes` with 0d arraysBas van Beek2021-09-091-12/+17
|
* TST: Make nanfunc test ignore overflow instead of xfailing testSebastian Berg2021-09-071-3/+1
| | | | | | This makes the test more precise, and I ran into having to broaden the xfails otherwise, because right now reduce-likes incorrectly faile to give floating point warnings (and I was fixing that).
* 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
* TST: Add more tests for `nanmedian`, `nanquantile` and `nanpercentile`Bas van Beek2021-09-031-0/+17
|
* TST: Expand the old `TestNanFunctions_IntTypes` test with non-integer number ↵Bas van Beek2021-09-031-71/+52
| | | | types