File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -563,6 +563,22 @@ cdef class usm_ndarray:
563563
564564 @shape.setter
565565 def shape (self , new_shape ):
566+ """
567+ Modifies usm_ndarray instance in-place by changing its metadata
568+ about the shape and the strides of the array, or raises
569+ `AttributeError` exception if in-place change is not possible.
570+
571+ Args:
572+ new_shape: (tuple, int)
573+ New shape. Only non-negative values are supported.
574+ The new shape may not lead to the change in the
575+ number of elements in the array.
576+
577+ Whether the array can be reshape in-place depends on its
578+ strides. Use :func:`dpctl.tensor.reshape` function which
579+ always succeeds to reshape the array by performing a copy
580+ if necessary.
581+ """
566582 cdef int new_nd = - 1
567583 cdef Py_ssize_t nelems = - 1
568584 cdef int err = 0
You can’t perform that action at this time.
0 commit comments