python in action

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

 

 

 

 

posted @ 2014-05-03 09:38  yjjsdu  阅读(254)  评论(0)    收藏  举报