Difference between various numpy random functions

前端 未结 2 749
南方客
南方客 2021-02-01 14:32

The numpy.random module defines the following 4 functions that all seem to return a float betweeb [0, 1.0) from the continuous uniform distribution. What (if any) is the differe

2条回答
  •  甜味超标
    2021-02-01 15:03

    I got different answers.

    print(np.random.random)
    print(np.random.ranf)
    print(np.random.sample)
    print(np.random.rand)
    print(np.random.random_sample is np.random.random)
    print(np.random.random_sample is np.random.ranf)
    print(np.random.random_sample is np.random.sample)
    
    
    
    
    
    
    False
    False
    False
    

提交回复
热议问题