-
-
Notifications
You must be signed in to change notification settings - Fork 879
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
Avoid using numpy.find_common_type
#7651
Conversation
cupy/_indexing/generate.py
Outdated
|
||
final_dtype = numpy.find_common_type(arraytypes, scalartypes) | ||
final_dtype = numpy.result_type(*key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, changes look good! This one, I suspect this is slightly more complicated because key
can include slice objects. I am happy to also make a PR (was going to look into it later). The change I did in NumPy is here:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! We don't support slice objects here so it should be OK for now 😄
cupy/cupy/_indexing/generate.py
Lines 49 to 50 in c5153de
if isinstance(k, slice): | |
raise NotImplementedError |
/test mini |
@asi1024 Could you check test failures? 🙏 |
/test mini |
f2b5351
to
9cc8dc2
Compare
/test mini |
@kmaehashi Ready to review! |
Test failures are irrelevant. |
Avoid using `numpy.find_common_type`
numpy.find_common_type
has been deprecated in NumPy 1.25.