dpnp.broadcast
- class dpnp.broadcast(*args)[source]
Produce an object that mimics broadcasting.
For full documentation refer to
numpy.broadcast.- Parameters:
*args (array_like) -- Input parameters.
- Returns:
broadcast -- Broadcast the input parameters against one another, and return an object that encapsulates the result. Amongst others, it has
shapeandndproperties, and may be used as an iterator.- Return type:
broadcast object
See also
dpnp.broadcast_arraysBroadcast any number of arrays against each other.
dpnp.broadcast_toBroadcast an array to a new shape.
dpnp.broadcast_shapesBroadcast the input shapes into a single shape.
Examples
>>> import dpnp as np >>> x = np.array([[1], [2], [3]]) >>> y = np.array([4, 5, 6]) >>> b = np.broadcast(x, y) >>> b.shape (3, 3) >>> b.nd 2 >>> b.size 9
Notes
Iterator functionality is not supported.