x //= yDivide two Python objects, giving the "floor" quotient, e.g., when dividing two integers, the result is the quotient using Euclidean division. Then 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 dividing.
|
|
|
If the Python class of x defines an __ifloordiv__ method for in-place floor division, then it will be called. Otherwise, x and y will be divided in the usual way, creating a new Python object that is assigned back to x.
For example, NumPy arrays support in-place floor division. In the example below, x is modified directly, and no new object is created.
|
|
|
|
The source of this document is in Python/doc/arithmetic.m2:582:0.