cunumeric.broadcast_to#

cunumeric.broadcast_to(arr: ndarray, shape: NdShapeLike, subok: bool = False) ndarray#

Broadcast an array to a new shape.

Parameters:
  • arr (array_like) – The array to broadcast.

  • shape (tuple or int) – The shape of the desired array. A single integer i is interpreted as (i,).

  • subok (bool, optional) – This option is ignored by cuNumeric.

Returns:

broadcast – A readonly view on the original array with the given shape. It is typically not contiguous. Furthermore, more than one element of a broadcasted array may refer to a single memory location.

Return type:

array

Availability:

Multiple GPUs, Multiple CPUs