Skip to content

Commit

Permalink
Changed TypeError wording per PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Nov 7, 2023
1 parent aadb6b4 commit da59476
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dpctl/tensor/_usmarray.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -191,10 +191,11 @@ cdef class usm_ndarray:
try:
<Py_ssize_t> shape
shape = [shape, ]
except Exception:
except Exception as e:
raise TypeError(
"Argument shape must be a list or a tuple."
)
"Argument shape must a non-negative integer, "
"or a list/tuple of such integers."
) from e
nd = len(shape)
if dtype is None:
if isinstance(buffer, (dpmem._memory._Memory, usm_ndarray)):
Expand Down

0 comments on commit da59476

Please sign in to comment.