dpctl.tensor.broadcast_to¶
- dpctl.tensor.broadcast_to(x, shape)[source]¶
Broadcast an array to a new shape; returns the broadcasted
dpctl.tensor.usm_ndarray
as a view.- Parameters:
x (usm_ndarray) – input array
shape (Tuple[int,...]) – array shape. The shape must be compatible with x according to broadcasting rules.
- Returns:
An array with the specified shape. The output array is a view of the input array, and hence has the same data type, USM allocation type and device attributes.
- Return type: