摘要: import numpy as np from numpy.linalg import * lst= np.eye(3) print(lst) ''' [[ 1. 0. 0.] [ 0. 1. 0.] [ 0. 0. 1.]] ''' lst1=np.array([[1,2],[3,4]]) # 矩阵的逆 print(inv(lst1)) # print(lst.invent... 阅读全文
posted @ 2017-09-27 21:30 hbb360 阅读(1520) 评论(0) 推荐(0) 编辑
摘要: # 两个数据的操作 lst1=np.array([10,20,30,40]) lst2=np.array([4,3,2,1]) print(lst1+lst2) # 和 print(lst1-lst2) # 差 print(lst1*lst2) # 乘 print(lst1/lst2) # 除 print(lst1**2) # 平方 # 点乘 print(lst1.reshap... 阅读全文
posted @ 2017-09-27 20:35 hbb360 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 可以先求出shape 求出 ndim,即可得到维度,也是秩。0维所有的数据。一维数据有两块。二维数据有四列。 求最大和最小: 数据的拼接,分离和复制 阅读全文
posted @ 2017-09-27 20:32 hbb360 阅读(254) 评论(0) 推荐(0) 编辑