dpnp.broadcast_arrays

dpnp.broadcast_arrays(*args, subok=False)[source]

Broadcast any number of arrays against each other.

For full documentation refer to numpy.broadcast_arrays.

Parameters:

args ({dpnp.ndarray, usm_ndarray}) -- A list of arrays to broadcast.

Returns:

out -- A list of arrays which are views on the original arrays from args.

Return type:

list of dpnp.ndarray

Limitations

Parameter subok is supported with default value. Otherwise NotImplementedError exception will be raised.

See also

dpnp.broadcast_to

Broadcast an array to a new shape.

Examples

>>> import dpnp as np
>>> x = np.array([[1, 2, 3]])
>>> y = np.array([[4], [5]])
>>> np.broadcast_arrays(x, y)
[array([[1, 2, 3],
        [1, 2, 3]]), array([[4, 4, 4],
        [5, 5, 5]])]