Javatpoint Logo
Javatpoint Logo


It is similar to the arrange function. However, it doesn?t allow us to specify the step size in the syntax.

Instead of that, it only returns evenly separated values over a specified period. The system implicitly calculates the step size.



It accepts the following parameters.

  1. start: It represents the starting value of the interval.
  2. stop:It represents the stopping value of the interval.
  3. num: The amount of evenly spaced samples over the interval to be generated. The default is 50.
  4. endpoint: Its true value indicates that the stopping value is included in the interval.
  5. rettstep: This has to be a boolean value. Represents the steps and samples between the consecutive numbers.
  6. dtype: It represents the data type of the array items.


An array within the specified range is returned.

Example 1


The array over the given range is  [10.  12.5 15.  17.5 20.]

Example 2


The array over the given range is  [10. 12. 14. 16. 18.]

Next Topicnumpy.logspace()

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA