Articles → Numpy → rand function in NumPy

rand function in NumPy






Purpose





Syntax


random.rand([number1, number 2….])















Example


import numpy as np

print("No value is passed - ",np.random.rand())
print("One value is passed - ",np.random.rand(2))
print("Two values are passed - ",np.random.rand(2,2))





Click to Enlarge


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

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250