summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | | | | | DOC: Ignore attribute FutureWarning in doc buildSebastian Berg2023-01-181-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The docs somehow seem to access `numpy.str`, etc. during the autodoc generation probably. This adds a specific warning filter to hide it. Closes gh-22987
* | | | | | | | | | | | | | | BUG: fix ma.diff not preserving mask when using append/prepend (#22776)Marko Pacak2023-01-194-7/+182
| |/ / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port CORE diff relevant code to MA and adapt docstrings examples and add tsts. Closes gh-22465
* | | | | | | | | | | | | | BLD: Build PyPy 3.9 wheels. (#23023)Charles Harris2023-01-181-4/+1
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NumPy is dropping Python 3.8 for the 1.25.x release cycle. This updates PyPy to 3.9 in order to be consistant with that. Co-authored-by: Matti Picus <matti.picus@gmail.com>
* | | | | | | | | | | | | Merge pull request #23019 from seberg/finalize-non-sequence-stackCharles Harris2023-01-175-31/+30
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEP: Finalize the non-sequence stacking deprecation
| * | | | | | | | | | | | | DEP: Finalize the non-sequence stacking deprecationSebastian Berg2023-01-175-31/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `__array_function__` API currently will exhaust iterators so we cannot accept sequences reasonably. Checking for `__getitem__` is presumably enough to reject that (and was what the deprecation used). Future changes could allow this again, although it is not a useful API anyway, since we have to materialize the iterable in any case.
* | | | | | | | | | | | | | Merge pull request #22997 from seberg/issue-19291Charles Harris2023-01-173-97/+102
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | API: Fix cython exception handling for exported extern C functions
| * | | | | | | | | | | | | | DOC: Add release note for cython exception fixesSebastian Berg2023-01-121-0/+5
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | API: Add "except *" in cython `.pyd` where necessary based on reviewSebastian Berg2023-01-112-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The incref/decref function shouldn't be able to fail (especially the decref). But right now they can, this will be fixed when we redo clearing (see gh-22924)
| * | | | | | | | | | | | | | API: Fix cython exception handling for exported extern C functionsSebastian Berg2023-01-112-87/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This hopefully fixes them for all the functions currently in the `.pyd` files. A surprising amount of them look like scary thing I wouldn't mind to just delete :). Anyway, had looked at some Cython code today and remembered this. Closes gh-19291
* | | | | | | | | | | | | | | Merge pull request #23020 from seberg/faster-array-functionCharles Harris2023-01-1718-391/+554
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ENH: Improve array function overhead by using vectorcall
| * | | | | | | | | | | | | | | DOC: Adept internal docs a bit based on reviewSebastian Berg2023-01-171-2/+4
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | TST: Cover some more internal array-function code pathsSebastian Berg2023-01-171-0/+50
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | DOC: Add release notes for faster array-function dispatchingSebastian Berg2023-01-172-0/+14
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | STY: Make linter happy in numeric.py changesSebastian Berg2023-01-171-2/+5
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | BUG: Fix refcounting issues in C-side `like=` implementationSebastian Berg2023-01-171-10/+15
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | MAINT: Fix stacklevels for the new C dispatcher not adding oneSebastian Berg2023-01-176-18/+18
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | BENCH: Add two small additional overhead core benchmarksSebastian Berg2023-01-171-0/+9
| | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | MAINT: Move some others functions to use fastcallSebastian Berg2023-01-171-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes these functions much faster when used with keyword arguments now that the array-function dispatching does not rely on `*args, **kwargs` anymore.
| * | | | | | | | | | | | | | | MAINT: Move concatenate to fastcall protocolSebastian Berg2023-01-171-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The refactor to use vectorcall/fastcall is obviously much better if we don't have to go back and forth, for concatenate we get: arr = np.random.random(20) %timeit np.concatenate((arr, arr), axis=0) Going from ~1.2µs to just below 1µs and all the way down to ~850ns (fluctuates quite a lot down to 822 even). ~40% speedup in total which is not too shabby.
| * | | | | | | | | | | | | | | ENH: Improve array function overhead by using vectorcallSebastian Berg2023-01-178-346/+413
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves dispatching for `__array_function__` into a C-wrapper. This helps speed for multiple reasons: * Avoids one additional dispatching function call to C * Avoids the use of `*args, **kwargs` which is slower. * For simple NumPy calls we can stay in the faster "vectorcall" world This speeds up things generally a little, but can speed things up a lot when keyword arguments are used on lightweight functions, for example:: np.can_cast(arr, dtype, casting="same_kind") is more than twice as fast with this. There is one alternative in principle to get best speed: We could inline the "relevant argument"/dispatcher extraction. That changes behavior in an acceptable but larger way (passes default arguments). Unless the C-entry point seems unwanted, this should be a decent step in the right direction even if we want to do that eventually, though. Closes gh-20790 Closes gh-18547 (although not quite sure why)
* | | | | | | | | | | | | | | | BUG: use `_Alignof` rather than `offsetof()` on most compilers (#23016)Khem Raj2023-01-172-3/+13
|/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WG14 N2350 made very clear that it is an UB having type definitions within "offsetof" [1]. This patch enhances the implementation of macro _ALIGN to use builtin "_Alignof" to avoid undefined behavior on when using std=c11 or newer clang 16+ has started to flag this [2] Fixes build when using -std >= gnu11 and using clang16+ Older compilers gcc < 4.9 or clang < 8 has buggy _Alignof even though it may support C11, exclude those compilers too [1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm [2] https://reviews.llvm.org/D133574 Signed-off-by: Khem Raj <raj.khem@gmail.com> * Apply suggestions from code review Signed-off-by: Khem Raj <raj.khem@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | | | | | | | | | | | | | | Merge pull request #23026 from seberg/bump-ciCharles Harris2023-01-171-6/+6
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI: Bump debug test to ubuntu-latest/22.04 rather than 20.04
| * | | | | | | | | | | | | | | CI: Bump debug test to ubuntu-latest/22.04 rather than 20.04Sebastian Berg2023-01-171-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bumps the `armv7_simd_test` and `debug` one to use newer python versions as they were still on 3.8.
* | | | | | | | | | | | | | | | DOC: #22266 Add examples for tril_indices_from(), triu_indices_from() (#22562)Richie Cotton2023-01-161-2/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DOC: #22266 Add examples for tri[lu]_indices_from() * DOC: see also for tri[lu]_indices_from() * DOC: Fix triu_indices_from example and minor updates. * incides -> indices * Update wording surrounding . Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | | | | | | | | | | | | | | | Merge pull request #22921 from charris/test-latest-cibuildwheelCharles Harris2023-01-163-6/+5
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BLD: Try building wheels with cibuildwheel 2.12.0
| * | | | | | | | | | | | | | | | BLD: Try cibuildwheel v2.12.0Charles Harris2023-01-162-2/+2
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | BLD: Try cibuildwheel 2.11.4Charles Harris2023-01-163-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also cleanup some uneeded/commented stuff.
| * | | | | | | | | | | | | | | | BLD: Try disables mingw32Sayed Adel2023-01-161-1/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | BLD, SIMD: Pad asm to avoid C99 complains on CLANGSayed Adel2023-01-161-3/+3
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | MAINT: Create lib path if missing.Charles Harris2023-01-161-0/+1
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | BLD: Try 2.11.3 to narrow things down.Charles Harris2023-01-162-2/+2
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | BLD: Try building wheels with cibuildwheel 2.11.4Charles Harris2023-01-162-2/+2
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | DOC: Add example for np.ma.diag (#22960)Stefanie Molin2023-01-161-0/+32
| |/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DOC: Add example for np.ma.diag as part of numpy#22269 * Add descriptions to example. * Fix typo.
* | | | | | | | | | | | | | | | DOC: Structured array doc update to note `dtype[name]` (#22723)A Chethan Reddy2023-01-161-0/+5
|/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add note that name access of structured dtypes is allowed. Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | | | | | | | | | | | | | | MAINT: `f2py` cleanup (#22885)Rohit Goswami2023-01-163-21/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Updates the free format handling of .f90 and other common extensions (through a minor re-write). Also removes an unused function. This disallows previously allowed (but highly unlikely to be present) code-paths, namely having fixed form F77 code in a fortran 90 file (with .f90). Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
* | | | | | | | | | | | | | | DOC: Add version added information for the strict parameter in ↵Mark Harfouche2023-01-151-0/+2
| |_|_|_|/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assert_array_equal (#23015)
* | | | | | | | | | | | | | Merge pull request #23013 from HaoZeke/fixMesonF2pyDocCharles Harris2023-01-151-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | DOC: Fix a typo in f2py meson docs
| * | | | | | | | | | | | | DOC: Fix a typo in f2py meson docsRohit Goswami2023-01-161-3/+3
|/ / / / / / / / / / / / /
* | | | | | | | | | | | | ENH: Faster numpy.load (try/except _filter_header) (#22916)Michael2023-01-133-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This pull requests speeds up numpy.load. Since _filter_header is quite a bottleneck, we only run it if we must. Users will get a warning if they have a legacy Numpy file so that they can save it again for faster loading. Main discussion and benchmarks see #22898 Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | | | | | | | | | | | | Merge pull request #23004 from tupui/circleci_sshSebastian Berg2023-01-121-0/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | CI: Fix CircleCI ssh key missing
| * | | | | | | | | | | | | CI: Fix CircleCI ssh key missing.Pamphile Roy2023-01-121-0/+2
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [skip github] [skip actions] [skip travis] [skip azp] [skip cirrus]
* | | | | | | | | | | | | CI: Fix circleCI devdoc deploy path (#23002)Sebastian Berg2023-01-121-1/+1
| | | | | | | | | | | | |
* | | | | | | | | | | | | MAINT/DOC: refactor CircleCI config file (#22948)Pamphile Roy2023-01-122-52/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #22943 we saw that CircleCI was using the deployment keys in all jobs. This PR update the configuration to restrict this on main. Doing that it also: Update to the latest configuration template Add a skip logic on the circleci_artifacts_redirector_job
* | | | | | | | | | | | | Merge pull request #22998 from seberg/dep-positive-finalizeCharles Harris2023-01-113-45/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEP: Finalize `+arr` returning a copy e.g. for string arrays
| * | | | | | | | | | | | | DEP: Finalize `+arr` returning a copy e.g. for string arraysSebastian Berg2023-01-113-45/+4
| |/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was deprecated 4-5 years ago in NumPy 1.16. Pandas stumbled over it cleaning up their warning filters, so I decided to just expire it.
* | | | | | | | | | | | | ENH: Improve loadtxt error with dtype and non-matchinig column number (#22996)Sebastian Berg2023-01-112-2/+20
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The number "changed" is weird if the user fixed it, so give a different message in that case.
* | | | | | | | | | | | Merge pull request #22991 from oleksandr-pavlyk/docs/result_type-docstring-fixSebastian Berg2023-01-111-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: Fix gh-22990 by correcting docstring of result_type
| * | | | | | | | | | | | DOC: Fix gh-22990 by correcting docstring of result_typeOleksandr Pavlyk2023-01-101-1/+1
|/ / / / / / / / / / / /
* | | | | | | | | | | | Merge pull request #22988 from mattip/troubleshootingCharles Harris2023-01-101-3/+65
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | DOC: add information about disabling SIMD for crashes
| * | | | | | | | | | | | DOC: add information about disabling SIMD for crashesmattip2023-01-101-3/+65
| | | | | | | | | | | | |