x @= yMultiply two Python objects (e.g., NumPy arrays) as matrices and assign the result to the first argument.
|
|
|
|
If the right-hand side is a Macaulay2 object, then it is first converted to a Python object before multiplying.
|
|
|
If the Python class of x defines an __imatmul__ method for in-place matrix multiplication, then it will be called. Otherwise, x and y will be multiplied in the usual way, creating a new Python object that is assigned back to x.
For example, NumPy arrays support in-place matrix multiplication. In the examples above, x was modified directly, and no new objects were created.
The source of this document is in Python/doc/arithmetic.m2:375:0.