summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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
| | | |
| * | | Add space after argument nameOscar Gustafsson2022-04-033-32/+31
| |/ /
* | | Improve documentation formattingOscar Gustafsson2022-04-032-10/+28
|/ /
* | Merge pull request #21232 from ganesh-k13/bug_21051_kronMatti Picus2022-03-272-11/+46
|\ \ | | | | | | BUG: Fixes `ValueError` in `np.kron`
| * | BUG: Convert other inputs to arrayGanesh Kathiresan2022-03-261-2/+4
| | | | | | | | | | | | Input such as matrix will cause a `ValueError` due to dim restrictions
| * | MAINT: Linting fixesGanesh Kathiresan2022-03-252-2/+3
| | |
| * | ENH: Refactor kron to not use concatGanesh Kathiresan2022-03-251-8/+15
| | |
| * | TST: Added testcases for `np.kron`Ganesh Kathiresan2022-03-221-0/+26
| | | | | | | | | | | | | | | | | | * Smoke tests to ensure `np.kron` works. * Shape tests to check if `np.kron` computes the right shape for different edge cases of input arrays
| * | BUG: Refactor `np.kron` to handle 0 in shapeGanesh Kathiresan2022-03-221-11/+10
| | | | | | | | | | | | | | | | | | * `np.kron` uses `np.concatenate` which fails when shape is 0 along an axis * Refactor shape normalising portion.
* | | Merge pull request #21216 from BvB93/_typingCharles Harris2022-03-2514-14/+14
|\ \ \ | |/ / |/| | MAINT: Split `numpy.typing` into a public and private component
| * | MAINT: Split `numpy.typing` into a public and private componentBas van Beek2022-03-1814-14/+14
| | | | | | | | | | | | i.e. `numpy.typing` and `numpy._typing`
* | | DOC: misc fixes:Matthias Bussonnier2022-03-212-3/+4
|/ / | | | | | | | | | | | | | | | | | | - improper urls - a few use of single bakcticks where many are expected - Proper numpydoc format [ci skip] [skip azp] [skip circle]
* | TYP, BUG: Fix `np.lib.stride_tricks` being re-exported under the wrong nameBas van Beek2022-03-121-1/+1
| |
* | Merge pull request #16895 from DevinShanahan/delete-speedupMatti Picus2022-02-272-5/+25
|\ \ | | | | | | MAINT: extend delete single value optimization
| * | MAINT: single value identification and testDevin Shanahan2022-01-162-3/+15
| | |
| * | MAINT: Merge branch 'main' into delete-speedupDevin Shanahan2022-01-1659-2901/+7570
| |\ \
| * | | Update numpy/lib/function_base.pyDevin Shanahan2020-07-191-1/+1
| | | | | | | | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
| * | | ENH: extend delete single value optimizationDevinShanahan2020-07-181-5/+13
| | | | | | | | | | | | | | | | | | | | Allow arrays of shape (1,) for delete's obj parameter to utilize the optimization for a single value. See #16685.
* | | | DOC: Fix spelling and grammar in documentation for quantile(). (#21068)Don Kirkby2022-02-151-12/+12
| | | |
* | | | BUG: (loadtxt) Ignore last empty field when `delimiter=None`Sebastian Berg2022-02-141-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the delimiter is None and we are splitting on whitespace, a final empty field is always ignored to match the behaviour of pythons split: `" 1 ".split()`. Closes gh-21052