numpy/arange

Arange

Create array with evenly spaced values

numpy
array
sequence

Command

np.arange(start, stop, step)

Explanation

Similar to Python’s range() but returns a NumPy array.

Examples

Array from 0 to 8 step 2

np.arange(0, 10, 2)