summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * | MAINT: Update tests to use new `method` argumentMilesCranmer2022-06-101-19/+20
| | |
| * | Add check for methodsMilesCranmer2022-06-101-0/+10
| | |
| * | MAINT: Change `_slow_integer` parameter to `method`MilesCranmer2022-06-101-16/+31
| | |
| * | MAINT: Fix linting errors in in1d testsMilesCranmer2022-06-092-9/+20
| | |
| * | TST: Extend np.in1d tests to old algorithmMilesCranmer2022-06-092-9/+61
| | | | | | | | | | | | | | | - Add flag ``_slow_integer`` to np.isin/np.in1d to force the use of the old isin/in1d algorithm for integers.
| * | MAINT: Check for overflow in integral np.isinMilesCranmer2022-06-091-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Before this fix, if, e.g., int8(-100) and int8(100) are the min and max, respectively, of ar2, ar2_range would experience an integer overflow and optimal_parameters would be an invalid value. ``if optimal_parameters:`` would skip the fast integer algorithm regardless, but warnings would be generated when they are unnecessary. - np.log10(... + 1) was changed to np.log10(... + 1.0) to avoid further potential problems from overflow here. - See https://github.com/numpy/numpy/pull/12065 for discussion.
| * | TST: add tests for in1d/isinMilesCranmer2022-06-091-0/+99
| | | | | | | | | | | | | | | | | | - These tests hit the areas of the old algorithm which are now replaced for the majority of cases - Another test tests behaviour of boolean input to isin/in1d
| * | MAINT: Optimize np.isin for boolean arraysMilesCranmer2022-06-091-0/+6
| | | | | | | | | | | | | | | - This change converts boolean input to numpy.isin and numpy.in1d into uint8, allowing the function to use the new optimized code
| * | MAINT: Optimize np.isin for integer arraysMilesCranmer2022-06-091-0/+40
| | | | | | | | | | | | | | | | | | - This optimization indexes with an intermediary boolean array to speed up numpy.isin and numpy.in1d for integer arrays over a range of optimal parameters which are calculated.
* | | BUG: lib: A loadtxt error message had two values reversed.warren2022-06-181-1/+1
| |/ |/| | | | | | | | | | | | | Fix the reversed arguments to the call of PyErr_Format() that generates the exception for an invalid index in usecols. Also fix the format characters in several other calls of PyErr_Format() where the arguments are Py_ssize_t.
* | TST: Clean up an opened temporary file descriptor in loadtxt testsSebastian Berg2022-06-141-0/+5
|/
* TST: Fixup loadtxt int-via-float tests when in release modeSebastian Berg2022-06-091-0/+2
| | | | | | | | | In release mode, the DeprecationWarning is not automatically raised, so we need to ensure this using a warning filter. (Also add missing metadata/info to the deprecation tests) Closes gh-21706
* Merge pull request #16971 from BvB93/nd_gridCharles Harris2022-06-092-17/+54
|\ | | | | BUG: Fix three `complex`- & `float128`-related issues with `nd_grid`
| * TST: Update the `np.mgrid` testsBas van Beek2021-10-131-0/+34
| |
| * BUG: Fixed an issue where `nd_grid` could cast `float128` to `float64`Bas van Beek2021-10-131-17/+20
| |
* | Merge pull request #21661 from BvB93/nanCharles Harris2022-06-031-0/+32
|\ \ | | | | | | TYP, ENH: Add annotations for the `equal_nan` keyword to `np.unique`
| * | TYP, ENH: Add annotations for the `equal_nan` keyword to `np.unique`Bas van Beek2022-06-031-0/+32
| | |
* | | TYP: Remove `normed=` from typing stubsSebastian Berg2022-06-022-10/+5
| | |
* | | DEP: Remove `normed=` keyword argument from histogromsSebastian Berg2022-06-023-120/+15
|/ / | | | | | | | | | | The normed keyword argument has been deprecated for a long time. This removes it, replacing its position with the new density argument.
* | MAINT: Fixup `unique`s `equal_nan` kwarg to match `np.array_equal`Sebastian Berg2022-06-012-12/+12
| | | | | | | | | | | | | | | | The other similar arguments in the testing functions and `np.array_equal` use `equal_nan` and not `equal_nans` (with plural s). So it seems we should use that here as well for consistency. Does some very minor style fixes otherwise.
* | MAINT: Update multiline indentationsJason Thai2022-06-011-1/+1
| | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
* | DOC: Update 21623 release documentationJason Thai2022-05-291-1/+1
| | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
* | DOC: Added releasenote for 21623Jason Thai2022-05-281-4/+4
| |
* | ENH: Added equal-nans kwarg to np.uniqueJason Thai2022-05-281-7/+11
| |
* | TST: Added test for np.unique equal_nans kwargJason Thai2022-05-281-0/+8
| |
* | MAINT: Python <3.7 related cleanupsBrigitta Sipőcz2022-05-231-2/+0
| |
* | Fix grammar [skip ci]Brigitta Sipőcz2022-05-211-2/+2
| | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
* | Fix docstring and examples for rfn.get_names*Brigitta Sipőcz2022-05-211-20/+13
| |
* | DOC: Update numpy/lib/function_base.pySebastian Berg2022-05-191-1/+1
| | | | | | Co-authored-by: Robert Kern <robert.kern@gmail.com>
* | DOC: improve the docstring of numpy.sinc to explain behavior at zero.Jesús Carrete Montaña2022-05-191-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first lines of the sinc docstring did not mention the behavior when the argument is zero, and gave the impression that the function is defined as the quotient between a sine and its argument everywhere. That information was instead relegated to the "Notes" section. I found this issue while navigating the documentation for jax.numpy.sinc, which inherits those few lines. I think it is important to document not only the value of the function at zero, but also that it make sinc a smooth function. This connects better with some of the other routes used to introduce sinc (e.g. as a Taylor series). I have tried to implement the conclusions of the discussion around Issue #21538, keeping the description close to the actual implementation and avoiding my original suggestion of introducing the function as a limit.
* | Merge pull request #19226 from ↵Matti Picus2022-05-191-1/+0
|\ \ | | | | | | | | | | | | seberg/fix-void-cast-safety-promotion-and-comparison API: Fix structured dtype cast-safety, promotion, and comparison
| * | API: Fix structured dtype cast-safety, promotion, and comparisonSebastian Berg2022-05-091-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR replaces the old gh-15509 implementing proper type promotion for structured voids. It further fixes the casting safety to consider casts with equivalent field number and matching order as "safe" and if the names, titles, and offsets match as "equiv". The change perculates into the void comparison, and since it fixes the order, it removes the current FutureWarning there as well. This addresses https://github.com/liberfa/pyerfa/issues/77 and replaces gh-15509 (the implementation has changed too much). Fixes gh-15494 (and probably a few more) Co-authored-by: Allan Haldane <allan.haldane@gmail.com>
* | | Addressing review for more cleanup and clarificationBrigitta Sipőcz2022-05-171-2/+1
| | |
* | | Remove deprecated iteratesBrigitta Sipocz2022-05-171-20/+0
| | |
* | | Remove python <3.6 related thingsBrigitta Sipocz2022-05-171-1/+1
| | |
* | | Merge pull request #21490 from WarrenWeckesser/average-keepdims-typingBas van Beek2022-05-111-0/+8
|\ \ \ | | | | | | | | TYP: Add typing for the keepdims param. of 'average' and 'ma.average'
| * | | TYP: Add typing for the keepdims param. of 'average' and 'ma.average'warren2022-05-101-0/+8
| | | | | | | | | | | | | | | | This is a follow-up to gh-21485.
* | | | BUG: lib: Allow type uint64 for eye() arguments.warren2022-05-112-4/+16
|/ / / | | | | | | | | | | | | | | | Closes gh-9982. (Plus a few small PEP 8 fixes.)
* | | ENH: Add 'keepdims' to 'average()' and 'ma.average()'.warren2022-05-092-6/+56
| | |
* | | TYP,ENH: Add the new `quotechar` parameter to `np.loadtxt`Bas van Beek2022-05-091-0/+3
|/ /
* | ENH: Optimize `np.empty` for scalar arguments (#20175)Francesco Andreuzzi2022-05-061-1/+3
| | | | | | | | | | | | | | | | Optimizes the parsing of shape tuples and integers by avoiding multiple conversions and generally refactoring the code. Closes gh-19010, that parsing a single integer was very slow (due to trying to convert it to a squence twice). Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | TST: Make `test_large_archive` robust against memory issues [wheel build]Sebastian Berg2022-05-021-2/+7
| |
* | TEST: on PyPy, skip hanging slow test [wheel build]mattip2022-05-021-0/+1
| |
* | MAINT: Added comment for kron workingGanesh Kathiresan2022-04-181-0/+9
| |
* | ENH: Improve `np.kron` performanceGanesh Kathiresan2022-04-181-6/+7
| | | | | | | | * Changed product computing logic for kron to use broadcasting
* | Merge pull request #21262 from ganesh-k13/kron_21257_maSebastian Berg2022-04-112-17/+23
|\ \ | | | | | | ENH: Masked Array support for `np.kron`
| * | TST: `np.kron` tests refinementGanesh Kathiresan2022-04-051-7/+17
| | | | | | | | | | | | | | | | | | | | | * Added `mat` cases to smoke tests * Changed type checks to handle new change which uses ufuncs order for result determination * Added cases for `ma` to check subclass info retention
| * | ENH: Maintain subclass info for `np.kron`Ganesh Kathiresan2022-04-051-10/+6
| | | | | | | | | | | | | | | | | | * Replace `*` call with `multiply` * Handle `mat` cases to perform reshape * Remove use result wrapping to maintain consistency with ufuncs
* | | Merge pull request #21291 from oscargus/spaceandcosCharles Harris2022-04-073-32/+31
|\ \ \ | | | | | | | | DOC: Add space after argument name
| * | | STY: Whitespace fixes.Charles Harris2022-04-071-3/+3
| | | |