Skip to content
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

(Do Merge) NumPy 2: Removed dead code conflicting with binary builds against NumPy 2 #9474

Closed
wants to merge 3 commits into from

Conversation

kc611
Copy link
Collaborator

@kc611 kc611 commented Mar 1, 2024

As titled

@kc611 kc611 added the skip_release_notes Skip towncrier requirement label Mar 4, 2024
@kc611 kc611 changed the title [DO NOT MERGE] NumPy 2 Experiment: Commented out potentially dead code (Do Merge) NumPy 2: Removed dead code conflicting with binary builds against NumPy 2 Mar 4, 2024
@kc611 kc611 marked this pull request as ready for review March 4, 2024 04:30
@kc611 kc611 added the NumPy 2.0 Related to NumPy 2.0 support label Mar 4, 2024
Comment on lines -548 to -557
} else if (PyUFunc_ReplaceLoopBySignature(ufunc,
(PyUFuncGenericFunction)loop_ptr,
arg_types_arr, &old_func) == 0) {
/* TODO: Consider freeing any memory held by the old loop (somehow) */
for (idx = 0; idx < ufunc->ntypes; idx++) {
if (ufunc->functions[idx] == (PyUFuncGenericFunction)loop_ptr) {
ufunc->data[idx] = data_ptr;
break;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found a case that reaches this:

from numba import vectorize, types


@vectorize
def foo(x):
    return x

foo.add(tuple([types.intp]))
foo.add(tuple([types.intp]))

I think it is valid for Numba to reject the second .add.

@kc611
Copy link
Collaborator Author

kc611 commented Mar 8, 2024

This PR is to be continued at #9466 along wih all the related NumPy 2 changes

@kc611 kc611 closed this Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NumPy 2.0 Related to NumPy 2.0 support skip_release_notes Skip towncrier requirement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants