Macaulay2 » Documentation
Packages » Python :: quotientRemainder(PythonObject,PythonObject)
next | previous | forward | backward | up | index | toc

quotientRemainder(PythonObject,PythonObject) -- quotient and remainder of python objects

Synopsis

Description

The quotient and remainder when x is divided by y. This calls Python's built-in divmod function.

i1 : quotientRemainder(toPython 37, toPython 5)

o1 = (7, 2)

o1 : Sequence
i2 : class \ oo

o2 = (PythonObject, PythonObject)

o2 : Sequence

If just one of the arguments is a python object, then the other is converted to a python object using toPython.

i3 : quotientRemainder(toPython 37, 5)

o3 = (7, 2)

o3 : Sequence
i4 : class \ oo

o4 = (PythonObject, PythonObject)

o4 : Sequence

Ways to use this method: