-
Notifications
You must be signed in to change notification settings - Fork 30
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
Fixed gh-998: exception raised while forming an expected TypeError exception message #999
Conversation
View rendered docs @ https://intelpython.github.io/dpctl/pulls/999/index.html |
invalid/unsupported data types.
7d010b1
to
05cb7fc
Compare
Array API standard conformance tests for dpctl=0.14.0=py310h8c27c75_13 ran successfully. |
return descr_to_typenum(dt) | ||
else: | ||
return -1 | ||
except TypeError: |
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 believe except *
in the definition of dtype_to_typenum
isn't needed anymore also, since no exception is raised by the function.
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.
Correct. This is an optimization change though. It does not hurt to keep it.
I will push the suggested change and merge.
Array API standard conformance tests for dpctl=0.14.0=py310h8c27c75_14 ran successfully. |
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.14.0=py310h8c27c75_14 ran successfully. |
This change fixes formation of
TypeError
message string.Closes #998.
It also reworks
dtype
argument validation, fixing unreferenced issue withdpt.usm_ndarray(1, dtype=np.dtype(">f4"))
.