I’m trying to convert some python code to julia to see how much time it will save me but I’m stuck trying to find the correct syntax in julia to match something trivial with numpy. In python I typically have some code that can be simplified like this:
x = np.random.rand(10,3)
y = np.random.rand(10,3)
tensor_prod = x.T.dot(y)
It’s also possible to use einsum :
np.einsum(‘ki,kj->ij’, x, y)
and both of these return the required 3x3 matrix.
I assumed this would be trivial to do in julia with:
but this returns a single value as it seems dot() is only for operating on vectors. How do I convert the simple python numpy code to julia?