scipp.full#

scipp.full(*, dims=None, shape=None, sizes=None, unit=<scipp._scipp.core.DefaultUnit object>, dtype=None, value, variance=None)#

Constructs a Variable with values initialized to the specified value with given dimension labels and shape. The dims and shape can also be specified using a sizes dict.

Parameters
  • dims (Optional[Sequence[str]], default: None) – Optional (if sizes is specified), dimension labels.

  • shape (Optional[Sequence[int]], default: None) – Optional (if sizes is specified), dimension sizes.

  • sizes (Optional[dict], default: None) – Optional, dimension label to size map.

  • unit (Union[Unit, str, None], default: <scipp._scipp.core.DefaultUnit object at 0x7f749c6bf9b0>) – Optional, unit of contents. Default=dimensionless

  • dtype (Optional[DType], default: None) – Optional, type of underlying data. Deduced from ‘value’ if not given.

  • value (Any) – The value to fill the Variable 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.

Seealso

scipp.zeros() scipp.ones()

Return type

Variable