问题 I want a strange dot product for matrix multiplication in numpy. For a line [1,2,3] of matrix A and a column [4,5,6] for matrix B , I wish to use the "product" min(1+4, 2+5, 3+6) for obtaining the matrix product AB . 回答1: In [498]: A = np.arange(12).reshape(4,3) In [499]: B = np.arange(4,10).reshape(3,2) In [500]: A Out[500]: array([[ 0, 1, 2], [ 3, 4, 5], [ 6, 7, 8], [ 9, 10, 11]]) In [501]: B Out[501]: array([[4, 5], [6, 7], [8, 9]]) Reference iterative solution: In [504]: res = np.zeros((A