scipp.linspace

scipp.linspace

scipp.linspace(dim, start, stop, num, *, unit=dimensionless, dtype=None)

Constructs a Variable with num evenly spaced samples, calculated over the interval [start, stop].

Seealso

scipp.geomspace() scipp.logspace() scipp.arange()

Parameters
  • dim (str) – Dimension label.

  • start (_Union[int, float]) – The starting value of the sequence.

  • stop (_Union[int, float]) – The end value of the sequence.

  • num (int) – Number of samples to generate.

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

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

Return type

_cpp.Variable