1. introduction
from numpy import *
random.rand(4,4)
#array to matrix
randMat=mat(randon.rand(4,4))
#matrix inverse
IvrandMat=randMat.I
#indentity matrix
eye(4) # 4*4 identity matrix
randMat*IvrandMat
2. knn
python in action,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/jsquare/p/3704846.html