[Numpy-discussion] matrix multipln takes too much time
devnew at gmail.com
devnew at gmail.com
Wed Dec 26 02:36:06 EST 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