8000 API: Do not consider subclasses for NEP 50 weak promotion by seberg · Pull Request #26905 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

API: Do not consider subclasses for NEP 50 weak promotion #26905

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 2 commits into from
Jul 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
MAINT: Move assignment to (hopefully) avoid warning
  • Loading branch information
seberg committed Jul 25, 2024
commit 1e9291790aeb7e24b877f334b484b995eb59d452
4 changes: 3 additions & 1 deletion numpy/_core/src/umath/scalarmath.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -1389,7 +1389,8 @@ static PyObject *
npy_bool may_need_deferring;
conversion_result res = convert_to_@name@(
other, &other_val_conv, &may_need_deferring);
other_val = other_val_conv; /* Need a float value */
/* Actual float cast `other_val` is set below on success. */

if (res == CONVERSION_ERROR) {
return NULL; /* an error occurred (should never happen) */
}
Expand All @@ -1400,6 +1401,7 @@ static PyObject *
case DEFER_TO_OTHER_KNOWN_SCALAR:
Py_RETURN_NOTIMPLEMENTED;
case CONVERSION_SUCCESS:
other_val = other_val_conv; /* Need a float value */
break; /* successfully extracted value we can proceed */
case OTHER_IS_UNKNOWN_OBJECT:
case PROMOTION_REQUIRED:
Expand Down
Loading
0