scipp.broadcast#

scipp.broadcast(x, dims=None, shape=None, sizes=None)#

Broadcast a Variable or a DataArray.

If the input is a DataArray, coordinates and attributes are shallow-copied and masks are deep-copied.

Note that Scipp operations broadcast automatically, so using this function directly is rarely required.

One and only one of these sets of arguments must be given:

  • dims and shape

  • sizes

Parameters
Returns

Same type as input – New Variable or DataArray with requested dimension labels and shape.