-
Notifications
You must be signed in to change notification settings - Fork 46
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
add device kwarg to astype API #665
Conversation
Co-authored-by: Athan <kgryte@gmail.com>
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.
LGTM.
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.
LGTM too. One possible nit: IIRC we discussed about raising exceptions for casting to unsupported dtypes by a certain device. Do we want to address it in this PR, or another?
I'd like to have @oleksandr-pavlyk to take a look if possible.
@leofang Ah, you're right. We do need to address the condition where the requested device does not support the desired dtype. Although, this applies more generally to all creation functions supporting the |
Yup sounds good |
Thanks for the PR, LGTM as well. |
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.
LGTM. Thanks, @steff456!
As this PR has three approvals, will go ahead and merge. We'll submit a follow-up PR to add guidance concerning what should happen when a device does not support an array data type when using |
This PR,
device
kwarg toastype
API in the DRAFT versionIt fixes #647 (comment)