-
Notifications
You must be signed in to change notification settings - Fork 242
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
Array: use np.result_type directly #787
Conversation
This probably needs a bit more testing, but what do you think of the idea @inducer? |
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.
I'm generally in favor. The less of this duplicated nonsense logic we drag around, the better.
|
||
o1_key = obj1 if o1_is_integral and not o1_is_array else o1_dtype | ||
o2_key = obj2 if o2_is_integral and not o2_is_array else o2_dtype | ||
result = np.result_type(obj1, obj2) |
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.
Add a comment (like the one in pytato) that we're passing pyopencl arrays to numpy, and that it doesn't seem to mind. Maybe add an analogous test.
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.
Added in 5f668e2
0c37b58
to
7c4ddfd
Compare
Similar to inducer/pytato#540
Please squash