![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
numpy
你别说了多动脑子
这个作者很懒,什么都没留下…
展开
-
numpy——np.random.**
原文作者:aircraft 原文链接:https://www.cnblogs.com/DOMLX/p/9751471.html np.random.random()函数参数 np.random.random((1000, 20)) 上面这个就代表生成1000行 20列的浮点数,浮点数都是从0-1中随机。 numpy.random.rand()函数用法 numpy.random.rand(d0, d1, ..., dn): 生成一个[0,1)之间的随机浮点数或N维浮点数组。 numpy.ran原创 2020-09-19 23:25:03 · 122 阅读 · 0 评论 -
Python入门:numpy——自学(day 1)
创建array import numpy as np array = np.array([1,2,3], [3,4,5]) print(array) array的类型是dtype a = np.array([1,2,3],dtype=np.float64) print(a.dtype) zeros(), ones() empty() a = np.zeros((3,4)) print(a) ''' [[0. 0. 0. 0.] [0. 0. 0. 0.] [0. 0. 0. 0.]]原创 2020-09-18 00:25:00 · 550 阅读 · 0 评论