dask.array.arange

dask.array.arange

dask.array.arange(start=None, /, stop=None, step=1, *, chunks='auto', like=None, dtype=None, **kwargs)[source]

Return evenly spaced values from start to stop with step size step.

The values are half-open [start, stop), so including start and excluding stop. This is basically the same as python’s range function but for dask arrays.

When using a non-integer step, such as 0.1, the results will often not be consistent. It is better to use linspace for these cases.

Parameters
startint | float, optional

If stop is specified, the start of interval (inclusive); otherwise, the end of the interval (exclusive). Default: 0 when stop is specified.

stopint | float

The end of the interval (exclusive).

stepint | float, optional

The distance between two adjacent elements (out[i+1] - out[i]). Must not be 0; may be negative, this results in an empty array if stop >= start. Default: 1.

chunksint

The number of samples on each block. Note that the last block will have fewer samples if len(array) % chunks != 0. Defaults to “auto” which will automatically determine chunk sizes.

dtypenumpy.dtype

Output dtype. Omit to infer it from start, stop, step Defaults to None.

likearray type or None

Array to extract meta from. Defaults to None.

Returns
samplesdask array