Is there an advantage to using the @
operator over numpy.matmul
when multiplying vectors, matrices, etc? Is this mainly for readability? Whats is the convention?
Asked
Active
Viewed 1,758 times
4
-
2Does this answer your question? [Difference between numpy dot() and Python 3.5+ matrix multiplication @](https://stackoverflow.com/questions/34142485/difference-between-numpy-dot-and-python-3-5-matrix-multiplication) – Warcupine Jul 31 '20 at 19:44
-
Basically the same as the choice between `np.add` and `+`, or `np.multiply` and `*`. – hpaulj Jul 31 '20 at 19:50
-
1`@` was added precisely because [the Numpy community wanted an infix operator to replace explicit use of `matmul`](https://www.python.org/dev/peps/pep-0465/#motivation). – chepner Jul 31 '20 at 20:25