[Python] matrix vs array class
from numpy import * ## matrix class a=mat('1 2 3;4 5 6;7 8 9') # matrix multiply b=mat([[10,20,30],[40,50,60],[70,80,90]]) # element-wise multiply c=a*b d=multiply(a,b) print '\na=',a,'\nb=',b,'\nc=',c,'\nd=',d ## array class a=array(a) b=array([[10,20,30],[40,50,60],[70,80,90]]) c=dot(a,b) # matrix multiply d=a*b # element-wise multiply print '\na=',a,'\nb=',b,'\nc=',c,'\nd=',d array 위주로 쓰다가 do..