scipp.index#

scipp.index(value, dtype=None)#

Constructs a zero dimensional Variable representing an index.

This is equivalent to calling scipp.scalar() with unit=None.

Parameters
  • value (Any) – Initial value.

  • dtype (Optional[DType], default: None) – Optional, type of underlying data. Default=None, in which case type is inferred from value input.

Returns

Variable – A scalar (zero-dimensional) variable without unit.