摘要:
# 来源:NumPy Biginner's Guide 2e ch6 矩阵的逆 import numpy as np A = np.mat("0 1 2;1 0 3;4 -3 8") print "A\n", A ''' A [[ 0 1 2] [ 1 0 3] [ 4 -3 8]] ''' # 求 阅读全文
摘要:
# 来源:NumPy Biginner's Guide 2e ch5 创建矩阵 import numpy as np # mat 函数创建矩阵 # 空格分割行,分号分隔列 A = np.mat('1 2 3; 4 5 6; 7 8 9') print "Creation from string", 阅读全文
摘要:
# 来源:NumPy Beginner's Guide 2e ch4 交易相关偶对 import numpy as np from matplotlib.pyplot import plot from matplotlib.pyplot import show # 读入 BHP 的收盘价 bhp = 阅读全文