scipp.arange

scipp.arange(dim, start, stop=None, step=1, *, unit=dimensionless, dtype=None)

Constructs a Variable with evenly spaced values within a given interval. Values are generated within the half-open interval [start, stop) (in other words, the interval including start but excluding stop).

Seealso

scipp.linspace() scipp.geomspace() scipp.logspace()

Parameters
  • dim (str) – Dimension label.

  • start (Union[int, float, numpy.datetime64]) – Optional, the starting value of the sequence. Default=0.

  • stop (Optional[Union[int, float, numpy.datetime64]]) – End of interval. The interval does not include this value, except in some (rare) cases where step is not an integer and floating- point round-off can come into play.

  • step (Union[int, float]) – Optional, spacing between values. Default=1.

  • unit (Union[scipp._scipp.core.Unit, str]) – Optional, data unit. Default=dimensionless

  • dtype (Optional[scipp._scipp.core._DType]) – Optional, type of underlying data. Default=None, in which case type is inferred from value input.

Return type

scipp._scipp.core.Variable