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

# abs(PythonObject) -- absolute value of a python object

- Function: abs
- Usage:
    `abs x`
- Inputs:
  - x, a python object,
- Outputs:
  - a python object, the absolute value of x;

## Description

This is equivalent to the Python abs function.

    i1 : abs toPython(-12)

    o1 = 12

    o1 : PythonObject of class int

## Ways to use this method:

- abs(PythonObject) -- absolute value of a python object

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Python/doc.m2:378:0.