![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
numpy
Marina-ju
虽恼太迟,又庆幸终于找到了喜欢的事
展开
-
np.where()
a=np.arange(20).reshape(4,5) a array([[ 0, 1, 2, 3, 4], [ 5, 6, 7, 8, 9], [10, 11, 12, 13, 14], [15, 16, 17, 18, 19]]) np.where(a>10) (array([2, 2, 2, 2, 3, 3, 3, 3, 3], dtype=int64), array(...原创 2019-01-17 20:19:57 · 6735 阅读 · 1 评论 -
将txt数据读成矩阵形式
import numpy as np data = np.genfromtxt(‘ex1data1.txt’,delimiter=’,’) X = data[:,0] y = data[:,1]转载 2019-05-23 15:42:00 · 1859 阅读 · 0 评论