> 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.
you can either use matrix multiplication (see resultmatrix2) or tensordot
(see resultmatrix3).
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)
-
Hi there - quick suggestion on Xmas morning - others are much more
familar.
You do not want to use a loop to do the matrix multiply, you want to
use the intrinsic functions assoicated with matrix.
So you want something like
res = Math.abs( matmul(arrayone, arraytwo) )
note - that is not r
hi
i am doing some maths calculations involving matrices of double values
using numpy.matrix ,
java code for this is something like
int items=25;
int sample=5;
int totalcols=8100;
double[][]dblarrayone=new double[items][totalcols];
double[][]dblarraytwo=new double[items][totalcols];
//their eleme