Broadcasts an array to a new shape by replicating the data along new or size-1 axes.
Arguments
- x
(
arrayish)
Arrayish value of any data type.- shape
(
integer())
Target shape. The size of each mapped axis must either match the size of the corresponding axis ofx, or that axis ofxmust have size 1.- broadcast_axes
(
integer())
Maps each axis ofxto an axis of the output. Must have length equal to the number of axes ofx.
Value
arrayish
Has the same data type as the input and the given shape.
It is ambiguous if the input is ambiguous.
StableHLO
Lowers to hlo_broadcast_in_dim().