summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Use mask_to_true() for logical_not to save a few opsDeveloper-Ecosystem-Engineering2022-12-071-8/+16
| | | |
| * | | Remote setup.py.orig and use npyv_any/allDeveloper-Ecosystem-Engineering2022-12-072-1180/+3
| | | |
| * | | Fix smoke test running without NPY_SIMDDeveloper-Ecosystem-Engineering2022-12-061-13/+18
| | | |
| * | | Finish adopting universal intrinsics to fix AVX2/AVX512 tests.Developer-Ecosystem-Engineering2022-12-061-54/+0
| | | |
| * | | Add loops_logical.dispatch.c.src to meson.buildDeveloper-Ecosystem-Engineering2022-12-061-0/+1
| | | |
| * | | Update numpy/core/src/umath/loops_logical.dispatch.c.srcDeveloper-Ecosystem-Engineering2022-12-061-31/+0
| | | | | | | | | | | | Co-authored-by: Sayed Adel <seiko@imavr.com>
| * | | Update numpy/core/src/umath/loops_logical.dispatch.c.srcDeveloper-Ecosystem-Engineering2022-12-061-1/+1
| | | | | | | | | | | | Co-authored-by: Sayed Adel <seiko@imavr.com>
| * | | Update numpy/core/src/umath/loops_logical.dispatch.c.srcDeveloper-Ecosystem-Engineering2022-12-061-1/+3
| | | | | | | | | | | | Co-authored-by: Sayed Adel <seiko@imavr.com>
| * | | ENH: Add SIMD versions of bool logical_and, logical_or, logical_not and absoluteDeveloper-Ecosystem-Engineering2022-12-067-307/+1613
| | | | | | | | | | | | | | | | | | | | | | | | NumPy has SIMD versions of BOOL `logical_and`, `logical_or`, `logical_not`, and `absolute` for SSE2. The changes here replace that implementation with one that uses their universal intrinsics. This allows other architectures to have SIMD versions of the functions too. BOOL `logical_and` and `logical_or` are particularly important for NumPy as that's how `np.any()` / `np.all()` are implemented.
* | | | Merge pull request #22801 from ngoldbaum/rm-forward-declareCharles Harris2022-12-141-3/+0
|\ \ \ \ | | | | | | | | | | MAINT: remove unnecessary forward declaration of _convert_from_any
| * | | | MAINT: remove unnecessary forward declaration of _convert_from_anyNathan Goldbaum2022-12-141-3/+0
| | | | |
* | | | | BLD: fix issue in npymath on macOS arm64 in the Meson buildRalf Gommers2022-12-141-0/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was due to a cross-merge conflict. gh-22679 added a new file to the setup.py build, while the Meson build got merged. It's a file that only does anything on arm64 macOS, hence it wasn't noticed in CI. Addresses a "missing `npy_asinh`" problem discussed in gh-22796 [skip azp] [skip circle] [skip cirrus]
* | | | Merge pull request #22798 from seberg/pytest-leaksCharles Harris2022-12-142-3/+3
|\ \ \ \ | | | | | | | | | | BUG: Fix refcounting errors found using pytest-leaks
| * | | | BUG: Fix refcounting errors found using pytest-leaksSebastian Berg2022-12-142-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are the clear errors I found based on pytest-leaks. One day it would be nice to fix up pytest-leaks to better support newer versions of pytest and cleaning up fixtures...
* | | | | TST: Remove outdated xfail from quantile testsSebastian Berg2022-12-141-1/+0
|/ / / / | | | | | | | | | | | | There should be more tests for this, but this now passes.
* | | | Merge pull request #22792 from ngoldbaum/fix-unaligned-error-messageSebastian Berg2022-12-141-2/+3
|\ \ \ \ | | | | | | | | | | MAINT: elaborate on error message for unaligned casting spec
| * | | | MAINT: elaborate on error message for unaligned casting specNathan Goldbaum2022-12-131-2/+3
| | | | |
* | | | | Merge pull request #22791 from hawkinsp/floatbarrierCharles Harris2022-12-132-3/+3
|\ \ \ \ \ | | | | | | | | | | | | BUG: Ensure arguments to npy_floatstatus_..._barrier() can be dereferenced
| * | | | | Change argument to npy_floatstatus_..._barrier() functions to ensure itPeter Hawkins2022-12-132-3/+3
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is in bounds. The argument is dereferenced, even if the value is thrown away. AddressSanitizer reports an error on the dereference for these functions when running the NumPy test suite. It's unclear to me whether this is a legal fix or not, or whether we need to work harder to find a valid pointer that points within one of the arrays. This depends deeply on the semantics of `volatile` in C and I'm not 100% sure.
* | | | | Merge pull request #22789 from seberg/issue-22787Charles Harris2022-12-132-9/+11
|\ \ \ \ \ | |/ / / / |/| | | | BUG: Fix infinite recursion in longdouble/large integer scalar ops
| * | | | BUG: Fix infinite recursion in longdouble/large integer scalar opsSebastian Berg2022-12-132-9/+11
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | A smal bug snuck in when implementing NEP 50 weak-scalar logic, and unfortunately the tests didn't cover that specific path :/. closes gh-22787
* | | | MAINT: Remove two TODO notes that got outdated (#22788)Sebastian Berg2022-12-132-12/+3
|/ / / | | | | | | | | | The first one should have been removed in gh-22735, the second an even more random find.
* | | Merge pull request #22763 from ngoldbaum/legacy-dtype-check-unsizedSebastian Berg2022-12-122-3/+11
|\ \ \ | | | | | | | | MAINT: allow unsized NEP 42 user-defined dtypes
| * | | MAINT: allow unsized NEP 42 user-defined dtypesNathan Goldbaum2022-12-092-3/+11
| | |/ | |/|
* | | DOC: Add random generator exponential example (#22284)lzha972022-12-102-0/+32
|/ / | | | | | | | | | | | | | | | | | | | | * DOC: add examples for random generator exponential function (Issue #22270) * DOC: fix doc test for random exponential generator example (Issue #22270) * DOC: fix formatting on np.random.exponential example (Issue: #22270) * DOC: fix test and problem context on np.random.exponential example (Issue: #22270) * DOC: use may vary instead of will vary for exponential example (Issue: #22270)
* | DOC: add numerical integration of x^2 to trapz (#22681)Manuchehr Aminian2022-12-081-7/+23
| | | | | | | | | | | | | | | | Examples in documentation for trapz goes straight from integrating random arrays to parametric curves. I think it's worth pointing out one can integrate something they'd see in Calculus 1 and get the answer they'd expect. Also add some more guidance text to the existing examples (and style fixes) Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Melissa Weber Mendonça <melissawm@gmail.com>
* | BUG: Quantile function on complex number now throws an error (#22652) (#22703)Matteo Raso2022-12-084-15/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since percentile is more or less identical to quantile, I also made it throw an error if it receives a complex input. I also made nanquantile and nanpercentile throw errors as well. * Made the changes recommended by seberg * Fixed a test for PR 22703 * Fixed tests for quantile * Shortened some more lines * Fixup more lines Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
* | BUG: fix unexpected return of np.pad with mode=wrap (#22575)LU2022-12-072-13/+35
| | | | | | | | | | | | | | | | | | np.pad with mode="wrap" returns unexpected result that original data is not strictly looped in padding. This may happen in some occassions when padding widths in the same dimension are unbalanced (see added testcase in test_arraypad.py and the related issue). The reason is the function pad makes iterative calls of _set_wrap_both() in the above situation, yet period for padding is not correctly computed in each iteration. The bug is fixed by guaranteeing that period is always a multiple of original data size, and also be the possible maximum for computation efficiency. Closes #22464 Co-authored-by: Lars Grüter <lagru+github@mailbox.org>
* | BUG: Fix deepcopy cleanup on errorSebastian Berg2022-12-071-53/+62
| | | | | | | | | | | | | | | | The deepcopy cleanup on error did not clean up everything in all code paths. Our test do excercise the path, but leak checking is necessry to see the issue. Making a single PR, since it is a bit larger change.
* | Merge pull request #22750 from seiko2plus/issue_22170Sebastian Berg2022-12-072-10/+21
|\ \ | | | | | | BUG, SIMD: Fix rounding large numbers on SSE2
| * | BUG, SIMD: Fix rounding large numbers >= 2^52 on SSE2Sayed Adel2022-12-072-10/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before SSE41, there were no native instructions for rounding operations on double precision. We usually emulate it by assuming that the `MXCR` register is set to rounding, adding a large number `2^52` to `X` and then subtracting it back to eliminate any excess precision as long as `|X|` is less than `2^52` otherwise returns `X.` The current emulated intrinics `npyv_[rint,floor, ceil, trunc]_f64` was not checking whether `|x|` equal or large `2^52` which leads to losing accuracy on large numbers.
* | | DOC: Some updates to the array_api compat document (#22747)Aaron Meurer2022-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | * Add reshape differences to the array API compat document * Add an item to the array API compat document about reverse broadcasting * Make some wording easier to read
* | | Merge pull request #22735 from seberg/hide-exceptionsMatti Picus2022-12-065-14/+27
|\ \ \ | |_|/ |/| | API: Hide exceptions from the main namespace
| * | DOC: Fix doc `numpy.<exception>` to `numpy.exceptions.<exception>`Sebastian Berg2022-12-063-6/+6
| | |
| * | API: Hide exceptions from the main namespaceSebastian Berg2022-12-063-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I wasn't sure if we should already start deprecating the exceptions so opted to follow up with only hiding them from `__dir__()` but still having them in `__all__` and available. This also changes their module to `numpy.exceptions`, which matters because that is how they will be pickled (it would not be possible to unpickle such an exception in an older NumPy version). Due to pickling, we could put off changing the module.
* | | Merge pull request #22736 from melissawm/array-docstring-dtypeSebastian Berg2022-12-061-8/+8
|\ \ \ | |/ / |/| | DOC: Improve description of the dtype parameter in np.array docstring
| * | DOC: Improve description of the dtype parameter in np.array docstringmelissawm2022-12-051-8/+8
| |/
* | Merge pull request #22721 from byrdie/bugfix/median-keepdims-outSebastian Berg2022-12-066-33/+175
|\ \ | | | | | | BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median`.
| * | BUG: `keepdims=True` is ignored if `out` is not `None` in `numpy.median()`, ↵Roy Smart2022-12-056-33/+175
| | | | | | | | | | | | | | | | | | `numpy.percentile()`, and `numpy.quantile()`. Closes #22714, #22544.
* | | Merge pull request #22731 from HaoZeke/maBenchCleanupMatti Picus2022-12-052-131/+0
|\ \ \ | | | | | | | | BENCH: Update MaskedArray Benchmarks
| * | | MAINT: Kill old hand-written benchmarksRohit Goswami2022-12-052-131/+0
| | | |
* | | | Merge pull request #22166 from Developer-Ecosystem-Engineering/add_simd_negativeMatti Picus2022-12-058-90/+430
|\ \ \ \ | |_|/ / |/| | | ENH: Add SIMD versions of negative
| * | | Add loops_unary.dispatch.c.src to meson.buildDeveloper-Ecosystem-Engineering2022-11-291-0/+1
| | | |
| * | | Remove duplicated contiguous case for 'negative'Developer-Ecosystem-Engineering2022-11-281-9/+1
| | | |
| * | | test big arrays tooDeveloper-Ecosystem-Engineering2022-11-281-1/+5
| | | |
| * | | fix long linesDeveloper-Ecosystem-Engineering2022-11-281-6/+8
| | | |
| * | | add testsDeveloper-Ecosystem-Engineering2022-11-281-0/+23
| | | |
| * | | vnegq_s64 is only on aarch64Developer-Ecosystem-Engineering2022-11-281-1/+1
| | | |
| * | | Add required defines and casts for gcc buildsDeveloper-Ecosystem-Engineering2022-11-281-1/+6
| | | |
| * | | Remove original fileDeveloper-Ecosystem-Engineering2022-11-281-1173/+0
| | | |