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 the sequence is going to start. This is optional if we specify the end parameter
  2. End → This number specifies the number where the sequence will end. This number is excluded from the sequence
  3. Step → This is the number by which the sequence gets incremented. This is optional. If this parameter is not specified, then the sequence gets incremented by 1

Example


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



Output


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