Articles → NUMPY → arange function in NumPy

arange function in NumPy






Purpose





Syntax


arange(start,stop, step)




  1. Start – This number specifies the starting number from which sequence is going to start. This is optional if we specify end parameter.
  2. End – This number specifies the number where sequence will end. This number is excluded from the sequence.
  3. Step – This is the number by which sequence gets incremented. This is optional. If this parameter is not specified, then sequence gets incremented by 1.

Example


import numpy as np
np.arange(0,10)




Picture showing the output of arange function in numpy

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, March 18, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250