Python numpy.arrange()

The arrange() function of Python numpy class returns an array with equally spaced elements as per the interval where the interval mentioned is half opened, i.e. [Start, Stop).

Syntax

Parameter

start :It is an optional parameter which represents the start of the interval range. By default,the value of start is 0.

stop  :This parameter represents the end of the interval range.

step  :It is an optional parameter representing the step size of the interval. By default, step size = 1.

dtype :This parameter represents the type of output array.

Return

This function returns an array of evenly spaced values.

Example 1

Output

Arrange method:

Pin It on Pinterest

Share This