summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | TYP: deprecate `product`, `cumproduct`, `sometrue`, `alltrue`Bas van Beek2023-05-081-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xref https://github.com/numpy/numpy/pull/23314
| * | | | | | | TYP: Deprecate `np.round_`Bas van Beek2023-05-083-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xref https://github.com/numpy/numpy/pull/23302
| * | | | | | | TYP: Add the `np.exceptions` namespace and add `DTypePromotionError`Bas van Beek2023-05-083-21/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xref https://github.com/numpy/numpy/pull/22644 and https://github.com/numpy/numpy/pull/22707 Update modules.pyi
| * | | | | | | TYP: Let `np.einsum` accept `object` dtypesBas van Beek2023-05-083-9/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | xref https://github.com/numpy/numpy/pull/18053
| * | | | | | | Merge pull request #23709 from scoder/cython3_noexceptMatti Picus2023-05-076-34/+34
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | MAINT: Add "noexcept" markers to Cython functions that do not raise exceptions
| | * | | | | | | Also annotate the implementation of the kahan_sum() function, not just the ↵Stefan Behnel2023-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | declaration.
| | * | | | | | | Revert useless changes.Stefan Behnel2023-05-042-15/+15
| | | | | | | | |
| | * | | | | | | Merge branch 'main' into cython3_noexceptscoder2023-05-041149-54039/+183145
| | |\ \ \ \ \ \ \
| | * | | | | | | | Add "noexcept" markers to functions that do not raise exceptions.Stefan Behnel2023-05-045-45/+45
| | | | | | | | | |
| * | | | | | | | | Merge pull request #23726 from ↵Matti Picus2023-05-071-1/+1
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | neutrinoceros/fix_numpy_testing_assert_array_less_docstring DOC: fix incorrect description of raise condition in numpy.testing.assert_array_less's docstring
| | * | | | | | | | | DOC: fix incorrect description of raise condition in ↵Clément Robert2023-05-051-1/+1
| | | |_|_|_|/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | numpy.testing.assert_array_less's docstring
| * | | | | | | | | Merge pull request #23713 from seberg/uint-int-comparisonsCharles Harris2023-05-065-23/+173
| |\ \ \ \ \ \ \ \ \ | | |/ / / / / / / / | |/| | | | | | | | ENH: Make signed/unsigned integer comparisons exact
| | * | | | | | | | ENH: Make signed/unsigned integer comparisons exactSebastian Berg2023-05-045-23/+173
| | | |_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes comparisons between signed and unsigned integers exact by special-casing promotion in comparison to never promote integers to floats, but rather promote them to uint64 or int64 and use a specific loop for that purpose. This is a bit lazy, it doesn't make the scalar paths fast (they never were though) nor does it try to vectorize the loop. Thus, for cases that are not int64/uint64 already and require a cast in either case, it should be a bit slower. OTOH, it was never really fast and the int64/uint64 mix is probably faster since it avoids casting. --- Now... the reason I was looking into this was, that I had hoped it would help with NEP 50/weak scalar typing to allow: uint64(1) < -1 # annoying that it fails with NEP 50 but, it doesn't actually, because if I use int64 for the -1 then very large numbers would be a problem... I could probably(?) add a *specific* "Python integer" ArrayMethod for comparisons and that could pick `object` dtype and thus get the original Python object (the loop could then in practice assume a scalar value). --- In either case, this works, and unless we worry about keeping the behavior we probably might as well do this. (Potentially with follow-ups to speed it up.)
| * | | | | | | | Bug: Fix compilation of halffloat with gcc 13.1Sayed Adel2023-05-042-1/+2
| | |_|/ / / / / | |/| | | | | |
| * | | | | | | Merge pull request #23435 from r-devulap/spr-simd-sortMatti Picus2023-05-042-4/+12
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | ENH: Use AVX512 FP16 ISA for sorting float16 arrays
| | * | | | | | | ENH: Use x86-simd-sort to disptch avx512_qsort<_Float16>Raghuveer Devulapalli2023-04-051-4/+12
| | | | | | | | |
| | * | | | | | | MAINT: Update x86-simd-sort to latest commitRaghuveer Devulapalli2023-04-051-0/+0
| | | | | | | | |
| * | | | | | | | Merge pull request #23706 from seberg/testing-gfuncsSebastian Berg2023-05-031-68/+13
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | MAINT: Remove gisnan, gisinf, and gisfinite from testing code
| | * | | | | | | | MAINT: Remove gisnan, gisinf, and gisfinite from testing codeSebastian Berg2023-05-031-68/+13
| | | |/ / / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were introduced many years ago when ufuncs were buggy and could return NotImplemented sometimes. This has been fixed for many years, though. I suspect the errstate for `isfinite` is not required so removed it. It was a 12+ year old work-around for warnings that really shouldn't happen to begin with. (The commit mentions `np.isinf(np.inf)` giving a warning, which doesn't make sense, I think.)
| * | | | | | | | Merge pull request #23699 from ngoldbaum/repeat-remove-array-increfSebastian Berg2023-05-032-14/+101
| |\ \ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | | MAINT: refactor PyArray_Repeat to avoid PyArray_INCREF
| | * | | | | | | TST: test object dtype in test_repeatNathan Goldbaum2023-05-031-2/+3
| | | | | | | | |
| | * | | | | | | MAINT: apply specialization optimizationNathan Goldbaum2023-05-021-23/+83
| | | | | | | | |
| | * | | | | | | MAINT: refactor to use chunked castsNathan Goldbaum2023-05-021-8/+9
| | | | | | | | |
| | * | | | | | | MAINT: refactor PyArray_Repeat to avoid PyArray_INCREFNathan Goldbaum2023-05-021-2/+27
| | | | | | | | |
| * | | | | | | | Merge pull request #22137 from Micky774/enable_simdMatti Picus2023-05-033-53/+312
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | ENH allow for specifying CPU features to enable via `NPY_ENABLE_CPU_FEATURES` environment variable
| | * | | | | | | | ENH: add NPY_ENABLE_CPU_FEATURES to allow limiting set of enabled featuresMeekail Zain2023-04-083-53/+312
| | | | | | | | | |
| * | | | | | | | | Merge pull request #23700 from rossbar/doc/fix-23664Sebastian Berg2023-05-021-8/+7
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | DOC: Resolve length/index ambiguity in numpy.outer docstring
| | * | | | | | | | | DOC: add back reference.Ross Barnowski2023-05-021-3/+3
| | | | | | | | | | |
| | * | | | | | | | | DOC: fix reference formatting.Ross Barnowski2023-05-021-3/+3
| | | | | | | | | | |
| | * | | | | | | | | DOC: fix indexing inconsistency in outer docstring.Ross Barnowski2023-05-021-6/+5
| | | | | | | | | | |
| * | | | | | | | | | xfail underflowing scalar sinChris Sidebottom2023-05-021-0/+4
| | | | | | | | | | |
| * | | | | | | | | | Add test case for underflow exceptionChris Sidebottom2023-05-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Pierre Blanchard <Pierre.Blanchard@arm.com>
| * | | | | | | | | | BUG: Correct sin/cos float64 range check functionsChris Sidebottom2023-05-021-2/+2
| | |_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When I translated range checks for [sin](https://github.com/ARM-software/optimized-routines/blob/91d5bbc3091fa568e6856c7c41f9d7492d5957df/math/v_sin.c#L68): ```c cmp = v_cond_u64 ((ir >> 52) - TinyBound >= Thresh); ``` and [cos](https://github.com/ARM-software/optimized-routines/blob/91d5bbc3091fa568e6856c7c41f9d7492d5957df/math/v_cos.c#L56): ```c cmp = v_cond_u64 (v_as_u64_f64 (r) >= v_as_u64_f64 (RangeVal)); ``` They ended up the wrong way around, this corrects it.
| * | | | | | | | | MAINT: random: In a test module, don't use a global non-deterministically ↵warren2023-05-011-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generator.
| * | | | | | | | | BUG: random: Don't return negative values from Generator.geometric.warren2023-04-302-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In C, when the integer part of a double exceeds the maximum int64, casting the double to int64_t is undefined behavior. On some platforms, the result is 2**64-1 and on others it is -2**64. That results in rng.geometric() returning -2**64 when p was sufficiently small on some platforms. The fix is to never invoke undefined behavior by ensuring we don't attempt to cast very large double values to int64_t.
| * | | | | | | | | BUG: Fix masked array ravel order for A (and somewhat K)Sebastian Berg2023-04-282-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Swaps the order to the correct thing and thus closes gh-23651
| * | | | | | | | | Merge pull request #23600 from HaoZeke/f2pyFuncFix_23598Sebastian Berg2023-04-286-1/+57
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | BUG: Infer return types for Fortran functions in `f2py`
| | * \ \ \ \ \ \ \ \ Merge branch 'main' into f2pyFuncFix_23598Sebastian Berg2023-04-2649-986/+1734
| | |\ \ \ \ \ \ \ \ \ | | | |/ / / / / / / /
| | * | | | | | | | | TST: Add a test for the f2py function wrapper fileRohit Goswami2023-04-172-0/+33
| | | | | | | | | | |
| | * | | | | | | | | BUG: Ensure function wrappers have consistent argsRohit Goswami2023-04-171-0/+6
| | | | | | | | | | |
| | * | | | | | | | | MAINT: Fix tests for f2py inferred return typesRohit Goswami2023-04-161-2/+5
| | | | | | | | | | |
| | * | | | | | | | | BUG: Fix return types for functions in f2pyRohit Goswami2023-04-161-0/+2
| | | | | | | | | | |
| | * | | | | | | | | TST: Add a test for gh-23598Rohit Goswami2023-04-162-1/+13
| | | | | | | | | | |
| * | | | | | | | | | TST: add tests for numpy.quantile (#23129)Christian Lorentzen2023-04-281-5/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds additional tests for quantiles: 1. Identification equation $E[V(q, Y)] = 0$ 2. Adding a constant $c > 0$: $q(c + Y) = c + q(Y)$ 3. Multiplying by a constant $c > 0$: $q(c \cdot Y) = c \cdot q(y)$ 4. Multiplying by $-1$: $q_{\alpha}(-Y) = -q_{1-\alpha}(Y)$ (Note by seberg as reviewer: These tests are fairly complex, but may be useful for future development. But if they seem too complicated, they are probably not really vital and could be shortened or removed.)
| * | | | | | | | | | Merge pull request #23528 from seberg/allow-backcomp-buildsMatti Picus2023-04-2810-57/+155
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | ENH: Allow, and default to, downstream building with old API
| | * | | | | | | | | | Apply suggestions from code reviewSebastian Berg2023-04-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
| | * | | | | | | | | | DOC: Align default with what the NEP draft saysSebastian Berg2023-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have three choices: 1. Be compatible with limited API (oldest supported Python version) 2. Be compatible with everything on the same Python version (this) 3. Be strict and default to NEP 29 This just rephrases things to be 2. Because our API version was not bumped over the relevant time frame, it is actually also compatible with the first.
| | * | | | | | | | | | MAINT,DOC: Update based on Ralf's reviewSebastian Berg2023-04-201-7/+1
| | | | | | | | | | | |
| | * | | | | | | | | | Tweak to just warn for low versionsSebastian Berg2023-04-061-9/+9
| | | | | | | | | | | |
| | * | | | | | | | | | TST,DOC: Avoid spaces to hopefully ensure more info on error and fix memtestsSebastian Berg2023-04-042-1/+2
| | | | | | | | | | | |