dpnp.tensor.reshape¶
- dpnp.tensor.reshape(X, /, shape, *, order='C', copy=None)[source]¶
Reshapes array
xinto new shape.- Parameters:
x (usm_ndarray) -- Input array.
shape (tuple of ints) -- The desired shape of the resulting array.
order ({"C", "F"}, optional) --
Memory layout of the resulting array if a copy is found to be necessary. Supported choices are
"C"for C-contiguous, or row-major layout; and"F"for F-contiguous, or column-major layout.Default:
"C".copy ({None, bool}, optional) --
Whether or not to copy the input array. If
True, always copies. IfFalse, never copies and raises aValueErrorif a copy is required. IfNone, copies only when necessary.Default:
None.
- Returns:
out -- Reshaped array is a view, if possible, and a copy otherwise with memory layout as indicated by
orderkeyword.- Return type: