1.np.random.rand(d0,d1,...)

2.np.random.randn(d0,d1,...)

d0,d1,... refer to the dimension of matrix you want to generate, "rand" generates number belong to [0, 1)(uniform distribution) and "randn"  generates number~N(0,1)(normal distribution)

if you don't assign any value to d0,d1,....  then 1 and 2 return a number with "float" type

20190924_1:numpy.random.**的用法

 

相关文章:

  • 2021-08-29
  • 2021-06-27
  • 2022-12-23
  • 2022-02-12
  • 2022-01-05
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-12
  • 2021-05-28
  • 2022-12-23
  • 2022-12-23
  • 2021-04-19
相关资源
相似解决方案