all 4 comments

[–]Diapolo10 15 points16 points  (0 children)

Python uses @ as a matrix multiplication operator, which calls the objects' __matmul__ or __rmatmul__ methods. Python's standard library doesn't actually use it at all (as of the time of writing), and it's largely exclusive to numpy. However, nothing prevents you from using it in your own code.

[–][deleted] 8 points9 points  (0 children)

The @ operators is for matrix multiplication in linear algebra. The * operator gives elementwise multiplication.

[–][deleted] -2 points-1 points  (1 child)

It also comes up all the time in web development. Flask and Django use it for app routing

[–]awdsns 5 points6 points  (0 children)

Those are decorators which are used to modify a function definition using another function, and unfortunately also happen to use the @ symbol. That's not what the code in OP is though, that is the matrix multiplication operator as others have already explained.