spy()以图片的方式表示系数矩阵
Demo
import matplotlib.pyplot as plt import numpy as np a = np.array([[0,4,5,6,7], [5,0,6,6,0], [0,4,5,0,7], [1,4,0,6,3], [1,0,5,2,1]]) plt.spy(a) plt.show()
spy()以图片的方式表示系数矩阵
Demo
import matplotlib.pyplot as plt import numpy as np a = np.array([[0,4,5,6,7], [5,0,6,6,0], [0,4,5,0,7], [1,4,0,6,3], [1,0,5,2,1]]) plt.spy(a) plt.show()