scipp.full_like(var, value, variance=None)#

Constructs a new object with the same dims, shape, unit and dtype as the input (Variable or DataArray), but with all values, and optionally variances, initialized to the specified value and variance. If the input is a DataArray, coordinates and attributes are shallow-copied and masks are deep copied.

  • var (Variable) – Input variable or data array.

  • value (Any) – The value to fill the data with.

  • variance (Optional[Any], default: None) – Optional, the variance to fill the Variable with. If None or not provided, the variances will not be set.


scipp.zeros_like() scipp.ones_like() scipp.empty_like()

Return type