Skip to content
masterclass Buddy

NumPy · Function

np.arange

numpy.arange returns a NumPy array of evenly spaced values over an interval. It includes the start and normally excludes the stop.

Last updated

Since
2.0.0

Syntax

numpy.arange([start,] stop, [step,] dtype=None, *, device=None, like=None)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • numpy.linspace
  • numpy.ogrid
  • numpy.mgrid

Source: numpy.arange — NumPy v2.5 Manual. Checked 2026-11-03.