We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents eec1594 + 5929d6b commit 9ca3b6bCopy full SHA for 9ca3b6b
dpctl/tensor/_usmarray.pyx
@@ -1110,13 +1110,19 @@ cdef class usm_ndarray:
1110
"converted to usm_ndarray"
1111
)
1112
else:
1113
+ rhs_np = np.asarray(rhs)
1114
+ if type_bytesize(rhs_np.dtype.num) < 0:
1115
+ raise ValueError(
1116
+ f"Input of type {type(rhs)} can not be "
1117
+ "assigned to usm_ndarray because of "
1118
+ f"unsupported data type '{rhs_np.dtype}'"
1119
+ )
1120
try:
- rhs_np = np.asarray(rhs)
1121
_copy_from_numpy_into(Xv, rhs_np)
1122
except Exception:
1123
raise ValueError(
1124
f"Input of type {type(rhs)} could not be "
- "converted to usm_ndarray"
1125
+ "copied into dpctl.tensor.usm_ndarray"
1126
1127
return
1128
0 commit comments