dpctl.tensor.usm_ndarray.shape¶
- usm_ndarray.shape¶
Elements of the shape tuple give the lengths of the respective array dimensions.
Setting shape is allowed only when reshaping to the requested dimensions can be returned as view, otherwise
AttributeError
is raised. Usedpctl.tensor.reshape()
to reshape the array in all cases.- Example:
from dpctl import tensor x = tensor.arange(899) x.shape = (29, 31)