scipp.ones_like¶
- scipp.ones_like(var)¶
Constructs a
Variable
with the same dims, shape, unit and dtype as the input variable, but with all values initialized to 1. If the input has variances, all variances in the output are set to 1.- Seealso
- Parameters
var (scipp._scipp.core.Variable) – Input variable.
- Return type