Expression Class - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Expression

Python representation of a Maple expression

 

Description

Method Summary

Direct Subclasses

Description

• 

The maple.Expression class is the base class for every Python class representing a Maple object.  Its member functions provide the basic operations useful for any Maple object.

Method Summary

• 

The following methods are defined on any Expression object and invoke the specified implementation in Maple.

Method name

Usage

Maple implementation

eval

x.eval()

eval function

__abs__

abs(x)

abs function

__add__

x+y

addition

__call__

x(...)

function application

__ceil__

ceil(x)

ceil

__complex__

complex(x)

convert to complex float

__eq__

x==y

equation

__float__

float(x)

apply evalf

__floor__

floor(x)

apply floor

__floordiv__

floordiv(x,y)

apply iquo

__ge__

x>=y

relation

__getitem__

x.y

Maple name x:-y

__gt__

x>y

relation

__hash__

hash(x)

 

__int__

int(x)

truncate when numeric

__le__

x<=y

relation

__len__

len(x)

compute length or numelems for containers

__lt__

x<y

relation

__mod__

mod(x,y)

modp(x,y)

__mul__

x*y

multiplication

__ne__

x!=y

x<>y

__neg__

neg(x)

-x

__pow__

x**y

exponentation

__radd__

y+x

addition

__repr__

repr(x)

return string representation of x

_repr_latex_

x._repr_latex_()

return LaTeX rendering of x as a string

__rmod__

mod(y,x)

round

__rmul__

y*x

multiplication

__rpow__

y**x

exponentation

__rsub__

y-x

subtraction

__rtruediv__

y/x

y/x

__str__

str(x)

 

__sub__

x-y

subtraction

__truediv__

x/y

x/y

__trunc__

trunc(x)

trunc

Direct Subclasses

• 

Indexable

• 

ComplexNumeric

• 

Name

See Also

OpenMaple

OpenMaple/Python

OpenMaple/Python/ComplexNumeric

OpenMaple/Python/Examples

OpenMaple/Python/Name

OpenMaple/Python/RealNumeric

OpenMaple/Python/Table