scipp.ones_like
scipp.ones_like#
- scipp.ones_like(var)#
Constructs a new object with the same dims, shape, unit and dtype as the input (
Variable
orDataArray
), but with all values initialized to 1. If the input has variances, all variances in the output are set to 1. If the input is aDataArray
, coordinates and attributes are shallow-copied and masks are deep copied.