dpnp.broadcast_to
- dpnp.broadcast_to(array, /, shape, subok=False)[source]
Broadcast an array to a new shape.
For full documentation refer to
numpy.broadcast_to
.- Parameters:
- Returns:
out -- An array having a specified shape. Must have the same data type as array.
- Return type:
dpnp.ndarray
Limitations
Parameter subok is supported with default value. Otherwise
NotImplementedError
exception will be raised.See also
dpnp.broadcast_arrays
Broadcast any number of arrays against each other.
Examples
>>> import dpnp as np >>> x = np.array([1, 2, 3]) >>> np.broadcast_to(x, (3, 3)) array([[1, 2, 3], [1, 2, 3], [1, 2, 3]])