Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between the "@" operator and np.matmul() [closed]

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?

like image 765
Gonzo Avatar asked Oct 23 '25 23:10

Gonzo


1 Answers

As the doc explains: The matmul function implements the semantics of the @ operator introduced in Python 3.5 following PEP465.

So basically, @ is the same as np.matmul without method parameters.

like image 171
Ehsan Avatar answered Oct 25 '25 11:10

Ehsan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!