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
时间: 2024-10-06 19:03:59