[Numpy-discussion] matrix multipln takes too much time

devnew@gmai... devnew@gmai...
Wed Dec 26 01:36:06 CST 2007


> on my computer I have:
> 1.    15.6 sec with your code
> 2.    0.072 sec with resultmatrix2
> 3.    0.040 sec with tensordot (resultmatrix3) (-- which is a 400x speed)


wow ,thanks!
the tensordot fn is blinding fast..
i added /modified
 resultndarray = tensordot(matrixone[:sample,:], matrixtwo.T,
axes=1).T
resultmatrix =matrix(abs(resultndarray))

so i can get rid of the negative values in a real case

..your replies helped a lot guys,thanx a lot and happy X'Mas

dn


More information about the Numpy-discussion mailing list