Macaulay2
»
Documentation
Packages
»
Python
::
Table of Contents
next | previous | forward | backward | up |
index
|
toc
Python : Table of Contents
Python
-- interface to Python
Python tutorial: creating a virtual environment and installing NumPy
Python tutorial: plotting the twisted cubic with Matplotlib
pythonValue
-- execute Python source code from a string
pythonRunScript
-- execute a sequence of Python statements
runSimpleString
-- execute Python source code from a string in __main__
setupVirtualEnvironment
-- set up a virtual environment
pipInstall
-- install a Python package
installNumPyMethods
-- install NumPy methods
import
-- import a Python module
PythonObject
-- a Python object
toPython
-- convert Macaulay2 things to Python objects
value(PythonObject)
-- convert python objects to Macaulay2 things
toFunction
-- convert callable python objects to Macaulay2 functions
addPyToM2Function
-- convenience function for adding value hooks
toString(PythonObject)
-- readable string representation of a python object
toExternalString(PythonObject)
-- unambiguous string representation of a python object
PythonObject _ Thing
-- get elements of python sequences
PythonObject _ Thing = Thing
-- set elements of mutable python sequences
length(PythonObject)
-- returns the length of a python object
isMember(PythonObject,PythonObject)
-- test membership in a python object
delete(Thing,PythonObject)
-- delete elements from mutable python sequences
iterator(PythonObject)
-- get iterator of iterable python object
next(PythonObject)
-- retrieve the next item from a python iterator
objectType
-- type of a python object
PythonObject @@ Thing
-- get an attribute of a python object
PythonObject @@? Thing
-- whether a python object has an attribute
PythonObject @@ Thing = Thing
-- set an attribute of a python object
PythonObject + PythonObject
-- add Python objects
PythonObject += Thing
-- augmented addition of Python objects
PythonObject - PythonObject
-- subtract Python objects
PythonObject -= Thing
-- augmented subtraction of Python objects
PythonObject * PythonObject
-- multiply Python objects
PythonObject *= Thing
-- augmented multiplication of Python objects
PythonObject @ PythonObject
-- matrix multiplication of Python objects
PythonObject @= Thing
-- augmented matrix multiplication of Python objects
PythonObject / PythonObject
-- true division of Python objects
PythonObject /= Thing
-- augmented true division of Python objects
PythonObject // PythonObject
-- floor division of Python objects
PythonObject //= Thing
-- augmented floor division of Python objects
PythonObject % PythonObject
-- the modulo operator for Python objects
PythonObject %= Thing
-- augmented modulo operator for Python objects
quotientRemainder(PythonObject,PythonObject)
-- get the quotient and remainder when dividing Python objects
PythonObject ^ PythonObject
-- exponentiation of Python objects
PythonObject ^= Thing
-- augmented exponentiation for Python objects
abs(PythonObject)
-- absolute value of a python object
PythonObject << PythonObject
-- the left shift operator for Python objects
PythonObject <<= Thing
-- augmented left shift for Python objects
PythonObject >> PythonObject
-- the right shift operator for Python objects
PythonObject >>= Thing
-- augmented right shift for Python objects
PythonObject & PythonObject
-- bitwise conjunction of Python objects
PythonObject &= Thing
-- augmented bitwise conjunction of Python objects
PythonObject | PythonObject
-- bitwise disjunction of Python objects
PythonObject |= Thing
-- augmented bitwise disjunction of Python objects
PythonObject ^^ PythonObject
-- bitwise exclusive disjunction of Python objects
PythonObject ^^= Thing
-- augmented bitwise exclusive disjunction of Python objects
PythonObject ~
-- bitwise negation of a python object
PythonObject and PythonObject
-- logical conjunction of Python objects
PythonObject or PythonObject
-- logical disjunction of Python objects
PythonObject xor PythonObject
-- logical exclusive disjunction of Python objects
not PythonObject
-- logical negation of a python object
PythonObject ? PythonObject
-- compare Python objects
PythonObject == PythonObject
-- equality of Python objects
?? PythonObject
-- null coalescing operator for Python objects
binomial(PythonObject,PythonObject)
-- binomial coefficient for Python objects
PythonObject !
-- factorial of a Python object
gcd(PythonObject,PythonObject)
-- greatest common divisor of Python objects
lcm(PythonObject,PythonObject)
-- least common multiple of Python objects
ceiling(PythonObject)
-- ceiling of a python object
floor(PythonObject)
-- floor of a python object
remainder(PythonObject,PythonObject)
-- remainder of python objects
round(PythonObject,PythonObject)
-- round a python object
truncate(PythonObject)
-- truncate a python object
isFinite(PythonObject)
-- whether a Python object is finite
isInfinite(PythonObject)
-- whether a Python object is infinite
exp(PythonObject)
-- exponential of a python object
expm1(PythonObject)
-- exponential minus one of a python object
log(PythonObject,PythonObject)
-- logarithm of a python object
log1p(PythonObject)
-- logarithm plus one of a python object
sqrt(PythonObject)
-- square root of a python object
acos(PythonObject)
-- arc cosine of a python object
asin(PythonObject)
-- arc sine of a python object
atan(PythonObject)
-- arc tangent of a python object
atan2(PythonObject,PythonObject)
-- arc tangent of quotient of python objects
cos(PythonObject)
-- cosine of a python object
sin(PythonObject)
-- sine of a python object
tan(PythonObject)
-- tangent of a python object
acosh(PythonObject)
-- inverse hyperbolic cosine of a python object
asinh(PythonObject)
-- inverse hyperbolic sine of a python object
atanh(PythonObject)
-- inverse hyperbolic tangent of a python object
cosh(PythonObject)
-- hyperbolic cosine of a python object
sinh(PythonObject)
-- hyperbolic sine of a python object
tanh(PythonObject)
-- hyperbolic tangent of a python object
erf(PythonObject)
-- error function of a python object
erfc(PythonObject)
-- complementary error function of a python object
Gamma(PythonObject)
-- gamma function of a python object
lngamma(PythonObject)
-- natural logarithm of the gamma function of a python object
PythonContext
-- persistent Python execution environment
PythonContext _ String
-- get value of variable in a python context
listSymbols(PythonContext)
-- get a table of all the variables and their values in a python context
use(PythonContext)
-- install variables from a python context
help(PythonObject)
-- documentation for python object
pythonHelp
-- run Python's interactive help utility