Javatpoint Logo
Javatpoint Logo


It creates an array by using the evenly spaced values over the given interval. The interval mentioned is half opened i.e. [Start, Stop]).



It accepts the following parameters.

  1. start: The starting of an interval. The default is 0.
  2. stop: represents the value at which the interval ends excluding this value.
  3. step: The number by which the interval values change.
  4. dtype: the data type of the numpy array items.


An array within the specified range is returned.

Example 1


[0. 2. 4. 6. 8.]

Example 2


The array over the given range is  [10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95]

Next Topicnumpy.asarray()

Please Share

facebook twitter google plus pinterest

Join Javatpoint Test Series
JavaTpoint offers Test Series on eLitmas, Amcat, Company Placement Papers, Programming Languages, SSC, Banking, Civil Services etc.

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA