I want to implement an operation on two matrices that is similar to matrix multiplication in that it each element of the resulting matrix is a function of the i
th row of the first matrix and the j
th column of the second matrix.
I would like to be able to do this using numpy and/or pandas using vectorized computations.
In other words:
How do I implemenent $A \bigotimes B = C$
where $C_{ij} = sum_k f(a_{ik}, b_{kj})$
in numpy and/or pandas?