jax.lax.broadcast

jax.lax.broadcast(operand, sizes)[source]

Broadcasts an array, adding new major dimensions.

Wraps XLA’s Broadcast operator.

Parameters
  • operand (Any) – an array

  • sizes (Sequence[int]) – a sequence of integers, giving the sizes of new major dimensions to add.

Return type

Any

Returns

An array containing the result.