3 ms·
By default, numpy.ndarray multiply element-wise. There is a separate type called numpy.matrix which does matrix math. Alternatively, as of Python 3.5, `a @ b` w
by Derbasti 10y ago
By default, numpy.ndarray multiply element-wise. There is a separate type called numpy.matrix which does matrix math. Alternatively, as of Python 3.5, `a @ b` will do matrix multiplication on NDArrays.