scipp.empty¶
- scipp.empty(*, dims=None, shape=None, sizes=None, unit=dimensionless, dtype=float64, with_variances=False)¶
Constructs a
Variable
with uninitialized values with given dimension labels and shape. The dims and shape can also be specified using a sizes dict. USE WITH CARE! Uninitialized means that values have undetermined values. Consider usingscipp.zeros()
unless you know what you are doing and require maximum performance.- Seealso
- Parameters
dims (Optional[Sequence[str]]) – Optional (if sizes is specified), dimension labels.
shape (Optional[Sequence[int]]) – Optional (if sizes is specified), dimension sizes.
sizes (Optional[dict]) – Optional, dimension label to size map.
unit (Union[scipp._scipp.core.Unit, str]) – Optional, unit of contents. Default=dimensionless
dtype (scipp._scipp.core._DType) – Optional, type of underlying data. Default=float64
with_variances (bool) – Optional, boolean flag, if True includes uninitialized variances. Default=False
- Return type