-
Notifications
You must be signed in to change notification settings - Fork 32
Implement dpctl.tensor.isdtype #1133
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
Implement dpctl.tensor.isdtype #1133
Conversation
|
|
||
| @pytest.mark.parametrize("dtype_str", list_dtypes) | ||
| def test_isdtype_kind_tuple(dtype_str): | ||
| if dtype_str.startswith("bool"): |
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.
Similar here, save dpt.dtype(dtype_str) and reuse it.
oleksandr-pavlyk
left a comment
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.
This looks good to me! Thank you @vlad-perevezentsev
|
Array API standard conformance tests for dpctl=0.14.3dev0=py310h76be34b_18 ran successfully. |
This PR adds
dpctl.tensor.isdtypefunction according to Python array API standard .This function takes a data type object and either a data type object, a string with the name of the kind of type(e.g. 'bool', 'real floating', 'numeric') or a tuple of strings or data types, and returns a boolean value indicating whether the input
dtypeis of a specified or is equal to the specified data type.The PR solves #1119