aesara.tensor.broadcast_to

Contents

aesara.tensor.broadcast_to#

aesara.tensor.broadcast_to(x: TensorVariable, shape: TensorVariable | Tuple[Variable]) TensorVariable[source]#

Broadcast an array to a new shape.

Parameters:
  • array – The array to broadcast.

  • shape – The shape of the desired array.

Returns:

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:

broadcast