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.
1 parent e2789db commit 39f057aCopy full SHA for 39f057a
dpctl/tensor/_usmarray.pyx
@@ -382,7 +382,7 @@ cdef class usm_ndarray:
382
else:
383
self._cleanup()
384
raise ValueError("buffer='{}' was not understood.".format(buffer))
385
- if (_offset + ary_min_displacement < 0 or
+ if shape_to_elem_count(nd, shape_ptr) > 0 and (_offset + ary_min_displacement < 0 or
386
(_offset + ary_max_displacement + 1) * itemsize > _buffer.nbytes):
387
388
raise ValueError(("buffer='{}' can not accommodate "
0 commit comments