-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
API: Switch to NEP 50 behavior by default #23912
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
197e61c
API: Switch to "weak" promotion state by default
seberg af5fe2e
MAINT,TST: Fix issues due to out-of-range integers
seberg 14f6aa1
MAINT: Robustify histogram unsigned-subtract and fix test for NEP 50
seberg 0cc124d
TST: Adjust tests for direct NEP 50 changes
seberg e19fd64
TST: Straight forward NEP 50 fixup or longdouble+int scalar tests
seberg 1f07c93
STY: Remove unnecessary indentation level
seberg e445e80
API: Use weak scalar logic in where (and fix up error paths slightly)
seberg 346a146
TST: Adept where test to NEP 50
seberg 166e806
MAINT: Require `select` for NEP 50 support
seberg 6cf68f3
Fix percentile and quantile
mhvk 623e0f0
TST: xfail test that checks `can_cast()` beahvior with pyints
seberg 0f18c6f
MAINT: Also adopt `q` handling from the main quantile/percnetile to n…
seberg 94b7f90
MAINT: Address review comments by Marten
seberg 841a280
TST: Fix one more tests
seberg 09418fc
TYP: Fix typing passing test which cannot pass anymore
seberg df8f9d6
DOC: Fix docs that cause an integer overflow
seberg 8a1497f
MAINT: Avoid overflow in comparison with int64 on shorter platforms
seberg 0aa93fa
DOC: Fix docstring pointing out quirks that got less bad with NEP 50
seberg 375de5d
TST: Undo test changes related to comparising to out-of-bound ints
seberg 0e6d569
MAINT: Undo now unnecessary random number cast to int64
seberg a907624
API: Disable `can_cast` with Python scalars (for now)
seberg dcb8de2
TST: Adjust test to avoid overflow (and bad results on BSD)
seberg 6707f39
BENCH: Explicitly skip reversed (arg)partition case because they fail
seberg ba47e60
MAINT: Address review comments
seberg bf0ff21
MAINT: Clean up error path (DescrFromType cannot fail for simple buil…
seberg 35e105f
MAINT: Address Nathans review comments
seberg b5c8398
MAINT: appease linter
ngoldbaum File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
MAINT: Clean up error path (DescrFromType cannot fail for simple buil…
…tins) But move the error check to be higher up and thus more directly relevant. If `PyArray_DescrFromType` could have failed, the code would have been incorrect anyway.
- Loading branch information
commit bf0ff21419f2d0f43c646e72b758e73a9cdf1b4b
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3297,15 +3297,14 @@ PyArray_Where(PyObject *condition, PyObject *x, PyObject *y) | |
NPY_ITER_READONLY | NPY_ITER_ALIGNED | ||
}; | ||
common_dt = PyArray_ResultType(2, &op_in[2], 0, NULL); | ||
if (common_dt == NULL) { | ||
goto fail; | ||
|
||
PyArray_Descr * op_dt[4] = {common_dt, PyArray_DescrFromType(NPY_BOOL), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Couldn't hurt to add a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK, we really should probably just have a name for it... |
||
common_dt, common_dt}; | ||
NpyIter * iter; | ||
NPY_BEGIN_THREADS_DEF; | ||
|
||
if (common_dt == NULL || op_dt[1] == NULL) { | ||
mhvk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Py_XDECREF(op_dt[1]); | ||
goto fail; | ||
} | ||
iter = NpyIter_MultiNew( | ||
4, op_in, flags, NPY_KEEPORDER, NPY_UNSAFE_CASTING, | ||
op_flags, op_dt); | ||
|
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.
Uh oh!
There was an error while loading. Please reload this page.