numpy的randn函数,python中numpy.random

  numpy的randn函数,python中numpy.random

  numpy.random.rand()、numpy.random.randn()、numpy.random.normal()函数介绍和示例1.numpy.random.rand()均匀分布范围[0, 1)示例1:

  将数组导入为npnp.random.rand(3)数组([0.80545471,0.8132838,0.59762584])示例2:

  随机变量数组([[0.79955294,0.56241534,0.67593124],[0.16356763,0.71001303,0.52741388]])示例3:

  随机的数组([[0.17844452,0.36553281,0.90357176,0.78932622],[0.53421229,0.13978213,0.31328913,0.75269785],[0.74034518,0.876685 numpy . randn .)标准正态分布示例1:

  随机的数组([0.35738398,0.02672184,0.26278804])示例2:

  随机的数组([[ 0.93106417,-0.38827155,-0.81768464],[ 0.46475948,-0.27193259,-0.26922956]])示例3:

  随机的数组([[ 0.19908743,-0.92495647,0.9808552,-0.47325937],[ 1.54989882,-0.06039804,-2.31621729,-0.88064188],[-1.74904243,-0.788 numpy . random . normal(loc=mu,scale=sigma正态分布

  穆,均值西格玛,标准差尺寸,数据形状,默认一个值释义:

  将数组作为npnp.random.normal(0,1)-1.30283093339154示例1导入:

  np.random.normal(loc=1,scale=1,size=[2,3])数组([[ 1.87362984,1.61234442,0.64205185],[-0.13785191,2.52394268,1.2784189 ]])示例2:

  np.random.normal(1,1,[2,3])数组([[0.69187823,0.70919534,2.41977738],[1.91058404,1.47210289,1.90765577]])

郑重声明:本文由网友发布,不代表盛行IT的观点,版权归原作者所有,仅为传播更多信息之目的,如有侵权请联系,我们将第一时间修改或删除,多谢。

留言与评论(共有 条评论)
   
验证码: