ImportNumPy as NPdefTest_run (): Data=np.random.random ((3,4)) """[ [0.80150549 0.96756513 0.18914514 0.85937016] [0.23563908 0.75685996 0.46804508 0.91735016] [0.705 41929 0.04969046 0.75052217 0.2801136]]"""Data=np.random.rand (3,4) """[ [0.48137826 0.82544788 0.24014543 0.56807129] [0.02557921 0.50690438 0.29423376 0.85673923] [0.326 48763 0.97304461 0.6034564 0.70554691]]"""Data=np.random.normal (size= (2,3))#mean=0, Sd=1 """[ [1.57598046 0.06976049-1.6502364] [0.30437287-0.88249543-0.04233034]"""Data=np.random.normal (50,10,size= (2,3))#mean=50, sd=10 """[ [34.40308274 56.17179863 36.05758636] [57.38723594 41.43156664 65.54296858]""" Print(Np.random.randint (10))#6 Print(Np.random.randint (0,10))#9 Print(Np.random.randint (0,10,size= (5)))#[2 1 8 4 1] Print(Np.random.randint (0,10,size= (2,3))) """[ [0 2 4] [3 8 3]]"""if __name__=="__main__": Test_run ()
[Python] Generating random numbers using NumPy lib