scipp.array(*, dims, values, variances=None, unit=dimensionless, dtype=None)

Constructs a Variable with given dimensions, containing given values and optional variances. Dimension and value shape must match. Only keyword arguments accepted.


scipp.zeros() scipp.ones() scipp.empty() scipp.scalar()

  • dims (_Iterable) – Dimension labels

  • values (array_like) – Initial values.

  • variances (_Optional[array_like]) – Optional, initial variances, must be same shape and size as values. Default=None

  • unit (_Union[_cpp.Unit, str]) – Optional, data unit. Default=dimensionless

  • dtype (type(_cpp.dtype.float64)) – Optional, type of underlying data. Default=None, in which case type is inferred from value input.

Return type