|
|
|
|
|
by zhd
1988 days ago
|
|
Numpy arrays do indeed support the @-operator for matrix multiplication. In fact, one of the common design questions when adding the @-operator to Python was "why do this, when it's not used anywhere in the core language or standard library?" - and the answer was "because it's important for Numpy and the numerical user community". (and finally, adding __matmul__ and __rmatmul__ is entirely backwards compatible; you can use objects with those methods on Python 3.4 - it's only `A @ B` which is a syntax error) |
|