Articles → Numpy → Linspace Function In Numpy

Linspace Function In Numpy






Purpose




Picture showing the 3 evenly spaced numbers
Click to Enlarge



Picture showing the 4 evenly spaced numbers
Click to Enlarge


Syntax


linspace(start, end, number_of_evenly_spaced_numbers)



Example


import numpy as np

print(np.linspace(0,150,3))
print(np.linspace(0,150,4))



Output


Picture showing the output of linspace function in NumPy
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, March 20, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250