__call__ - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


__call__

invoke Expression as function

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

x.__call__(y)

x(y)

Parameters

x

-

Expression object

y

-

zero or more arguments

Description

• 

__call__ invokes the expression x as a function and returns the result from the Maple session, which may be an Expression or a Python object.

• 

This function can also be called by simply entering x(...).

Examples

The following interactive session illustrates the use of this operator.

>>> import maple

>>> import maple.namespace

>>> x,y,diff,dsolve = maple.symbols(x,y,diff,dsolve)

>>> deq = { diff(y(x), x) == y(x), y(0) == 1 }

>>> # It is most natural to use dsolve directly as a function

>>> dsolve( deq );

y(x)=exp(x)

>>> # It may, however, also be used with the expr.methodName syntax

>>> dsolve.__call__( deq );

y(x)=exp(x)

See Also

OpenMaple

OpenMaple/Python/API

OpenMaple/Python/Expression