8000 BUG,ENH: Fix generic scalar infinite recursion issues by seberg · Pull Request #26904 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

BUG,ENH: Fix generic scalar infinite recursion issues #26904

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 7 commits into from
Jul 24, 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
Next Next commit
MAINT: For now, do not use exact checks (this is a follow up)
  • Loading branch information
seberg committed Jul 10, 2024
commit 799f5fbbac09290956807112761bc6e7d69c5f99
6 changes: 3 additions & 3 deletions numpy/_core/src/multiarray/scalartypes.c.src
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ find_binary_operation_path(
*self_op = NULL;

if (PyArray_IsScalar(other, Generic) ||
PyLong_CheckExact(other) ||
PyFloat_CheckExact(other) ||
PyComplex_CheckExact(other) ||
PyLong_Check(other) ||
PyFloat_Check(other) ||
PyComplex_Check(other) ||
PyBool_Check(other)) {
/*
* The other operand is ready for the operation already. Must pass on
Expand Down
0