pyccel.ast.cmathext module#

Module containing objects from the cmath module understood by pyccel

class pyccel.ast.cmathext.CmathAcos(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.acos function.

A class which represents a call to the acos function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'acos'#
class pyccel.ast.cmathext.CmathAcosh(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.acosh function.

A class which represents a call to the acosh function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'acosh'#
class pyccel.ast.cmathext.CmathAsin(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.asin function.

A class which represents a call to the asin function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'asin'#
class pyccel.ast.cmathext.CmathAsinh(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.asinh function.

A class which represents a call to the asinh function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'asinh'#
class pyccel.ast.cmathext.CmathAtan(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.atan function.

A class which represents a call to the atan function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'atan'#
class pyccel.ast.cmathext.CmathAtanh(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.atanh function.

A class which represents a call to the atanh function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'atanh'#
class pyccel.ast.cmathext.CmathCos(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.cos function.

A class which represents a call to the cos function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'cos'#
class pyccel.ast.cmathext.CmathCosh(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.cosh function.

A class which represents a call to the cosh function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'cosh'#
class pyccel.ast.cmathext.CmathExp(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.exp function.

A class which represents a call to the exp function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'exp'#
class pyccel.ast.cmathext.CmathFunctionBool(*args)[source]#

Bases: MathFunctionBase

Super-class from which functions returning a boolean inherit.

A super-class from which functions in the cmath library which return a boolean should inherit.

Parameters:

*args (TypedAstNode) – The arguments passed to the function.

class pyccel.ast.cmathext.CmathFunctionComplex(z: TypedAstNode)[source]#

Bases: MathFunctionBase

Super-class from which functions returning a complex number inherit.

A super-class from which functions in the cmath library which return a complex number should inherit.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

class pyccel.ast.cmathext.CmathIsclose(a, b, *, rel_tol=1e-09, abs_tol=0.0)[source]#

Bases: CmathFunctionBool

Class representing a call to the cmath.isclose function.

A class which represents a call to the isclose function from the cmath library.

Parameters:
name = 'isclose'#
class pyccel.ast.cmathext.CmathIsfinite(z)[source]#

Bases: CmathFunctionBool

Class representing a call to the cmath.isfinite function.

A class which represents a call to the isfinite function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'isfinite'#
class pyccel.ast.cmathext.CmathIsinf(z)[source]#

Bases: CmathFunctionBool

Class representing a call to the cmath.isinf function.

A class which represents a call to the isinf function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'isinf'#
class pyccel.ast.cmathext.CmathIsnan(z)[source]#

Bases: CmathFunctionBool

Class representing a call to the cmath.isnan function.

A class which represents a call to the isnan function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'isnan'#
class pyccel.ast.cmathext.CmathPhase(z)[source]#

Bases: PyccelFunction

Class representing a call to the cmath.phase function.

A class which represents a call to the phase function from the cmath library which calculates the phase angle of a complex number.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'phase'#
class pyccel.ast.cmathext.CmathPolar(z)[source]#

Bases: PyccelFunction

Class representing a call to the cmath.polar function.

A class which represents a call to the polar function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'polar'#
class pyccel.ast.cmathext.CmathRect(r, phi)[source]#

Bases: PyccelFunction

Class representing a call to the cmath.rect function.

A class which represents a call to the rect function from the cmath library.

Parameters:
  • r (TypedAstNode) – The first argument to the function, representing the radius.

  • phi (TypedAstNode) – The second argument to the function, representing the polar angle.

name = 'rect'#
class pyccel.ast.cmathext.CmathSin(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.sin function.

A class which represents a call to the sin function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'sin'#
class pyccel.ast.cmathext.CmathSinh(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.sinh function.

A class which represents a call to the sinh function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'sinh'#
class pyccel.ast.cmathext.CmathSqrt(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.sqrt function.

A class which represents a call to the sqrt function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'sqrt'#
class pyccel.ast.cmathext.CmathTan(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.tan function.

A class which represents a call to the tan function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'tan'#
class pyccel.ast.cmathext.CmathTanh(z: TypedAstNode)[source]#

Bases: CmathFunctionComplex

Class representing a call to the cmath.tanh function.

A class which represents a call to the tanh function from the cmath library.

Parameters:

z (TypedAstNode) – The expression passed as argument to the function.

name = 'tanh'#