Skip to content
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

Failed to build TypeError exception #998

Closed
antonwolfy opened this issue Nov 23, 2022 · 0 comments · Fixed by #999
Closed

Failed to build TypeError exception #998

antonwolfy opened this issue Nov 23, 2022 · 0 comments · Fixed by #999

Comments

@antonwolfy
Copy link
Collaborator

The example code should cause TypeError exception in dpctl:

import numpy
import dpctl.tensor as dpt
obj = dpt.empty((6,), dtype=numpy.object_)

but it failed to build the exception due to bellow error:

File dpctl/tensor/_usmarray.pyx:193, in dpctl.tensor._usmarray.usm_ndarray.__cinit__()

TypeError: can only concatenate str (not "numpy.dtype[object_]") to str
oleksandr-pavlyk added a commit that referenced this issue Nov 24, 2022
This change fixes formation of TypeError message string.
oleksandr-pavlyk added a commit that referenced this issue Nov 24, 2022
This change fixes formation of TypeError message string.
oleksandr-pavlyk added a commit that referenced this issue Nov 25, 2022
This change fixes formation of TypeError message string.

Also improved dtype argument validation.
oleksandr-pavlyk added a commit that referenced this issue Nov 25, 2022
oleksandr-pavlyk added a commit that referenced this issue Nov 28, 2022
This change fixes formation of TypeError message string.

Also improved dtype argument validation.
oleksandr-pavlyk added a commit that referenced this issue Nov 28, 2022
oleksandr-pavlyk added a commit that referenced this issue Nov 28, 2022
Fixed gh-998: exception raised while forming an expected TypeError exception message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant