Merged
Conversation
For arrays with a length-zero dimension (e.g. shape (0, 50)), nanargmin and nanargmax would incorrectly raise `ValueError: All-NaN slice encountered`, despite there being no NaNs in the input array. This commit avoids proceeding to the all-NaNs check for size-zero arrays, falling through to argmin/argmax which handle empty sequences.
Add binding so that inspect will work correctly closes numpy#21908
The array_api take() doesn't flatten the array by default, so the axis argument must be provided for multidimensional arrays. However, it should be optional when the input array is 1-D, which the signature previously did not allow. c.f. data-apis/array-api#644
BUG: Fix the signature for np.array_api.take [skip ci]
BLD: update OpenBLAS to an intermediate commit
Bumps [pypa/cibuildwheel](https://github.com/pypa/cibuildwheel) from 2.14.0 to 2.14.1. - [Release notes](https://github.com/pypa/cibuildwheel/releases) - [Changelog](https://github.com/pypa/cibuildwheel/blob/main/docs/changelog.md) - [Commits](pypa/cibuildwheel@66b46d0...f21bb83) --- updated-dependencies: - dependency-name: pypa/cibuildwheel dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
…ypa/cibuildwheel-2.14.1 MAINT: Bump pypa/cibuildwheel from 2.14.0 to 2.14.1
`f2py_init_func` is defined in `fortranobject.h` as:
typedef void (*f2py_init_func)(int *, npy_intp *,
f2py_set_data_func, int *);
`f90mod_rules.py` attempts to assign functions with the following
prototype to `func` of `struct FortranDataDef`:
void(*)(int*, int*, void(*)(char*, int*), int*)
This causes the `test_module_doc.py` test to fail when `npy_intp` is
`long` and clang 16 is used as the compiler because the assignment is
identified as an invalid function pointer conversion, which clang 16
treats as an error by default.
Using `npy_intp` instead of `int` fixes the error.
BUG: random: Fix check for both uniform variates being 0 in random_beta()
MAINT: do not use copyswap in flatiter internals
BUG: Fix error message for nanargmin/max of empty sequence
The implementation of Johnk's algorithm for beta(a, b) could generate nan values if both a and b were extremely small (i.e. subnormal or a small multiple of the smallest normal double precision float). The fix is to handle variate generation in this case by noting that when both a and b are extremely small, the probability of generating a double precision value that is not either 0 or 1 is also extremely small. In particular, if a and b are less than 3e-103, the probability of generating a (double precision) value that is not 0 or 1 is less than approximately 1e-100. So instead of using Johnk's algorithm in this extreme case, we can generate the values 0 or 1 as Bernoulli trials, with the probability of 1 being a/(a + b). Closes numpygh-24266.
BUG: random: Fix generation of nan by beta.
CI: Enable running intel_spr_sde_test with Intel SDE
The check needs to be in the python path, because also the printing for `str()` subtly changed. To be the same as tuples, we should actually print `(np.float32(3.), np.int8(1))` for `str()` (tuples include the repr), while for `repr()` we include the dtype so we would print similar (but ideally with full precision) to arrays. This isn't quite ideal, I would be happy to print the full repr in the `str()` but I guess that might be a bit annoying in practice, so maybe our Numeric types are special enough for now.
Remove legacy-inner-loop-selector and clean up the masked one (This was effectivly removed a while ago, but a deprecation was added for ABI compatibility if compiling against a newer NumPy that still had the slot). Removed the `reservedX` struct member docs, seems clear enough to not have them explicitly...
API: Remove several niche objects for numpy 2.0 python API cleanup
BUG: Move legacy check for void printing
BUG: do not modify the input to ufunc_at
API: Remove legacy-inner-loop-selector
``np.source`` and ``np.lookfor`` was removed (numpygh-24144).
DOC: Remove ``np.source`` and ``np.lookfor``
DOC: fix a couple typos and rst formatting errors in NEP 0053
This is a follow-up to numpygh-24272 which missed a few files.
Disable using BLAS in the PyPy job on Azure because it was broken. Before this PR, it uses to silently not find OpenBLAS and continue, now we have to be explicit about it.
BUG: Further fixes to indexing loop and added tests
CI: correct URL in cirrus.star
Fix rst formatting to correct rendered html
CI/BLD: fail by default if no BLAS/LAPACK, add 32-bit Python on Windows CI job
…ble (numpy#24289) As suggested by Chuck in a review comment on a previous PR. Sending as a separate follow-up also because it helps to check Cirrus CI triggering which we are looking at in issue 24280. [skip azp] [skip circle] [skip actions] [skip travis]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.