modelparameters.sympy.assumptions.handlers package

Submodules

modelparameters.sympy.assumptions.handlers.calculus module

This module contains query handlers responsible for calculus queries: infinitesimal, finite, etc.

class modelparameters.sympy.assumptions.handlers.calculus.AskFiniteHandler[source]

Bases: CommonHandler

Handler for key ‘finite’.

Test that an expression is bounded respect to all its variables.

Examples of usage:

>>> from ... import Symbol, Q
>>> from .calculus import AskFiniteHandler
>>> from ...abc import x
>>> a = AskFiniteHandler()
>>> a.Symbol(x, Q.positive(x)) == None
True
>>> a.Symbol(x, Q.finite(x))
True
static Add(expr, assumptions)[source]

Return True if expr is bounded, False if not and None if unknown.

Truth Table:

B

U

?

‘+’

‘-’

‘x’

‘+’

‘-’

‘x’

B

B

U

?

U

‘+’

U

?

?

U

?

?

‘-’

?

U

?

?

U

?

‘x’

?

?

?

?

  • ‘B’ = Bounded

  • ‘U’ = Unbounded

  • ‘?’ = unknown boundedness

  • ‘+’ = positive sign

  • ‘-’ = negative sign

  • ‘x’ = sign unknown


  • All Bounded -> True

  • 1 Unbounded and the rest Bounded -> False

  • >1 Unbounded, all with same known sign -> False

  • Any Unknown and unknown sign -> None

  • Else -> None

When the signs are not the same you can have an undefined result as in oo - oo, hence ‘bounded’ is also undefined.

static Exp1(expr, assumptions)
static GoldenRatio(expr, assumptions)
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static Mul(expr, assumptions)[source]

Return True if expr is bounded, False if not and None if unknown.

Truth Table:

B

U

?

s

/s

B

B

U

?

U

U

U

?

?

?

  • B = Bounded

  • U = Unbounded

  • ? = unknown boundedness

  • s = signed (hence nonzero)

  • /s = not signed

static NegativeInfinity(expr, assumptions)
static Number(expr, assumptions)
static Pi(expr, assumptions)
static Pow(expr, assumptions)[source]

Unbounded ** NonZero -> Unbounded Bounded ** Bounded -> Bounded Abs()<=1 ** Positive -> Bounded Abs()>=1 ** Negative -> Bounded Otherwise unknown

static Symbol(expr, assumptions)[source]

Handles Symbol.

Examples

>>> from ... import Symbol, Q
>>> from .calculus import AskFiniteHandler
>>> from ...abc import x
>>> a = AskFiniteHandler()
>>> a.Symbol(x, Q.positive(x)) == None
True
>>> a.Symbol(x, Q.finite(x))
True
static cos(expr, assumptions)
static exp(expr, assumptions)
static log(expr, assumptions)[source]
static sign(expr, assumptions)
static sin(expr, assumptions)

modelparameters.sympy.assumptions.handlers.common module

class modelparameters.sympy.assumptions.handlers.common.AskCommutativeHandler[source]

Bases: CommonHandler

Handler for key ‘commutative’

static Basic(expr, assumptions)[source]
static NaN(expr, assumptions)
static Number(expr, assumptions)
static Symbol(expr, assumptions)[source]

Objects are expected to be commutative unless otherwise stated

class modelparameters.sympy.assumptions.handlers.common.AskHandler[source]

Bases: object

Base class that all Ask Handlers must inherit

class modelparameters.sympy.assumptions.handlers.common.CommonHandler[source]

Bases: AskHandler

Defines some useful methods common to most Handlers

static AlwaysFalse(expr, assumptions)[source]
static AlwaysTrue(expr, assumptions)[source]
static NaN(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.common.TautologicalHandler[source]

Bases: AskHandler

Wrapper allowing to query the truth value of a boolean expression.

static And(expr, assumptions)[source]
static AppliedPredicate(expr, assumptions)[source]
static BooleanFalse(expr, assumptions)
static BooleanTrue(expr, assumptions)
static Equivalent(expr, assumptions)[source]
static Implies(expr, assumptions)[source]
static Not(expr, assumptions)[source]
static Or(expr, assumptions)[source]
static bool(expr, assumptions)[source]
modelparameters.sympy.assumptions.handlers.common.test_closed_group(expr, assumptions, key)[source]

Test for membership in a group with respect to the current operation

modelparameters.sympy.assumptions.handlers.matrices module

This module contains query handlers responsible for calculus queries: infinitesimal, bounded, etc.

class modelparameters.sympy.assumptions.handlers.matrices.AskComplexElementsHandler[source]

Bases: CommonHandler

static BlockMatrix(expr, assumptions)

Block Matrix elements

static DFT(expr, assumptions)
static Determinant(expr, assumptions)
static Factorization(expr, assumptions)
static HadamardProduct(expr, assumptions)
static Inverse(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)
static MatrixSlice(expr, assumptions)

Matrix Slice elements

static Trace(expr, assumptions)
static Transpose(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskDiagonalHandler[source]

Bases: CommonHandler

Handler for key ‘diagonal’

static DiagonalMatrix(expr, assumptions)[source]
static Factorization(expr, assumptions)
static Identity(expr, assumptions)
static Inverse(expr, assumptions)[source]
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskFullRankHandler[source]

Bases: CommonHandler

Handler for key ‘fullrank’

static Identity(expr, assumptions)
static Inverse(expr, assumptions)
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskIntegerElementsHandler[source]

Bases: CommonHandler

static BlockMatrix(expr, assumptions)

Block Matrix elements

static Determinant(expr, assumptions)
static HadamardProduct(expr, assumptions)
static Identity(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)
static MatrixSlice(expr, assumptions)

Matrix Slice elements

static Trace(expr, assumptions)
static Transpose(expr, assumptions)
static ZeroMatrix(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskInvertibleHandler[source]

Bases: CommonHandler

Handler for key ‘invertible’

static Identity(expr, assumptions)
static Inverse(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskLowerTriangularHandler[source]

Bases: CommonHandler

Handler for key ‘lower_triangular’

static Factorization(expr, assumptions)
static Identity(expr, assumptions)
static Inverse(expr, assumptions)[source]
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskOrthogonalHandler[source]

Bases: CommonHandler

Handler for key ‘orthogonal’

static Factorization(expr, assumptions)
static Identity(expr, assumptions)
static Inverse(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
predicate = Q.orthogonal
class modelparameters.sympy.assumptions.handlers.matrices.AskPositiveDefiniteHandler[source]

Bases: CommonHandler

Handler for key ‘positive_definite’

static Identity(expr, assumptions)
static Inverse(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskRealElementsHandler[source]

Bases: CommonHandler

static BlockMatrix(expr, assumptions)

Block Matrix elements

static Determinant(expr, assumptions)
static Factorization(expr, assumptions)
static HadamardProduct(expr, assumptions)
static Inverse(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)
static MatrixSlice(expr, assumptions)

Matrix Slice elements

static Trace(expr, assumptions)
static Transpose(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.matrices.AskSquareHandler[source]

Bases: CommonHandler

Handler for key ‘square’

static MatrixExpr(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.matrices.AskSymmetricHandler[source]

Bases: CommonHandler

Handler for key ‘symmetric’

static Identity(expr, assumptions)
static Inverse(expr, assumptions)
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.matrices.AskUnitaryHandler[source]

Bases: CommonHandler

Handler for key ‘unitary’

static DFT(expr, assumptions)[source]
static Factorization(expr, assumptions)
static Identity(expr, assumptions)
static Inverse(expr, assumptions)
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
predicate = Q.unitary
class modelparameters.sympy.assumptions.handlers.matrices.AskUpperTriangularHandler[source]

Bases: CommonHandler

Handler for key ‘upper_triangular’

static Factorization(expr, assumptions)
static Identity(expr, assumptions)
static Inverse(expr, assumptions)[source]
static MatAdd(expr, assumptions)[source]
static MatMul(expr, assumptions)[source]
static MatrixSlice(expr, assumptions)[source]
static MatrixSymbol(expr, assumptions)[source]
static Transpose(expr, assumptions)[source]
static ZeroMatrix(expr, assumptions)
modelparameters.sympy.assumptions.handlers.matrices.BM_elements(predicate, expr, assumptions)[source]

Block Matrix elements

modelparameters.sympy.assumptions.handlers.matrices.MS_elements(predicate, expr, assumptions)[source]

Matrix Slice elements

modelparameters.sympy.assumptions.handlers.matrices.MatMul_elements(matrix_predicate, scalar_predicate, expr, assumptions)[source]

modelparameters.sympy.assumptions.handlers.ntheory module

Handlers for keys related to number theory: prime, even, odd, etc.

class modelparameters.sympy.assumptions.handlers.ntheory.AskCompositeHandler[source]

Bases: CommonHandler

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.ntheory.AskEvenHandler[source]

Bases: CommonHandler

static Abs(expr, assumptions)[source]
static Add(expr, assumptions)[source]

Even + Odd -> Odd Even + Even -> Even Odd + Odd -> Even

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static Integer(expr, assumptions)[source]
static Mul(expr, assumptions)[source]

Even * Integer -> Even Even * Odd -> Even Integer * Odd -> ? Odd * Odd -> Odd Even * Even -> Even Integer * Integer -> Even if Integer + Integer = Odd

-> ? otherwise

static NegativeInfinity(expr, assumptions)
static NumberSymbol(expr, assumptions)[source]
static Pow(expr, assumptions)[source]
static Rational(expr, assumptions)
static im(expr, assumptions)[source]
static re(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.ntheory.AskOddHandler[source]

Bases: CommonHandler

Handler for key ‘odd’ Test that an expression represents an odd number

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.ntheory.AskPrimeHandler[source]

Bases: CommonHandler

Handler for key ‘prime’ Test that an expression represents a prime number. When the expression is a number the result, when True, is subject to the limitations of isprime() which is used to return the result.

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
static Float(expr, assumptions)[source]
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static Integer(expr, assumptions)[source]
static Mul(expr, assumptions)[source]
static NegativeInfinity(expr, assumptions)
static NumberSymbol(expr, assumptions)[source]
static Pow(expr, assumptions)[source]

Integer**Integer -> !Prime

static Rational(expr, assumptions)

modelparameters.sympy.assumptions.handlers.order module

AskHandlers related to order relations: positive, negative, etc.

class modelparameters.sympy.assumptions.handlers.order.AskNegativeHandler[source]

Bases: CommonHandler

This is called by ask() when key=’negative’

Test that an expression is less (strict) than zero.

Examples

>>> from ... import ask, Q, pi
>>> ask(Q.negative(pi+1)) # this calls AskNegativeHandler.Add
False
>>> ask(Q.negative(pi**2)) # this calls AskNegativeHandler.Pow
False
static Abs(expr, assumptions)
static Add(expr, assumptions)[source]

Positive + Positive -> Positive, Negative + Negative -> Negative

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
static ImaginaryUnit(expr, assumptions)
static Mul(expr, assumptions)[source]
static Pow(expr, assumptions)[source]

Real ** Even -> NonNegative Real ** Odd -> same_as_base NonNegative ** Positive -> NonNegative

static exp(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.order.AskNonNegativeHandler[source]

Bases: CommonHandler

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.order.AskNonPositiveHandler[source]

Bases: CommonHandler

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.order.AskNonZeroHandler[source]

Bases: CommonHandler

Handler for key ‘zero’ Test that an expression is not identically zero

static Abs(expr, assumptions)[source]
static Add(expr, assumptions)[source]
static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
static Mul(expr, assumptions)[source]
static NaN(expr, assumptions)
static Pow(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.order.AskPositiveHandler[source]

Bases: CommonHandler

Handler for key ‘positive’ Test that an expression is greater (strict) than zero

static Abs(expr, assumptions)[source]
static Add(expr, assumptions)[source]
static Basic(expr, assumptions)[source]
static Determinant(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
static ImaginaryUnit(expr, assumptions)
static MatrixElement(expr, assumptions)[source]
static Mul(expr, assumptions)[source]
static Pow(expr, assumptions)[source]
static Trace(expr, assumptions)[source]
static acos(expr, assumptions)[source]
static acot(expr, assumptions)[source]
static asin(expr, assumptions)[source]
static atan(expr, assumptions)[source]
static exp(expr, assumptions)[source]
static factorial(expr, assumptions)[source]
static log(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.order.AskZeroHandler[source]

Bases: CommonHandler

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
static Mul(expr, assumptions)[source]

modelparameters.sympy.assumptions.handlers.sets module

Handlers for predicates related to set membership: integer, rational, etc.

class modelparameters.sympy.assumptions.handlers.sets.AskAlgebraicHandler[source]

Bases: CommonHandler

Handler for Q.algebraic key.

static Add(expr, assumptions)[source]
static AlgebraicNumber(expr, assumptions)
static ComplexInfinity(expr, assumptions)
static Exp1(expr, assumptions)
static Float(expr, assumptions)
static GoldenRatio(expr, assumptions)
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static Mul(expr, assumptions)[source]
static NegativeInfinity(expr, assumptions)
static Pi(expr, assumptions)
static Pow(expr, assumptions)[source]
static Rational(expr, assumptions)[source]
static acos(expr, assumptions)
static acot(expr, assumptions)
static asin(expr, assumptions)
static atan(expr, assumptions)
static cos(expr, assumptions)
static cot(expr, assumptions)[source]
static exp(expr, assumptions)[source]
static log(expr, assumptions)[source]
static sin(expr, assumptions)
static tan(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.sets.AskAntiHermitianHandler[source]

Bases: AskImaginaryHandler

Handler for Q.antihermitian Test that an expression belongs to the field of anti-Hermitian operators, that is, operators in the form x*I, where x is Hermitian

static Add(expr, assumptions)[source]

Antihermitian + Antihermitian -> Antihermitian Antihermitian + !Antihermitian -> !Antihermitian

static Mul(expr, assumptions)[source]

As long as there is at most only one noncommutative term: Hermitian*Hermitian -> !Antihermitian Hermitian*Antihermitian -> Antihermitian Antihermitian*Antihermitian -> !Antihermitian

static Pow(expr, assumptions)[source]

Hermitian**Integer -> !Antihermitian Antihermitian**Even -> !Antihermitian Antihermitian**Odd -> Antihermitian

class modelparameters.sympy.assumptions.handlers.sets.AskComplexHandler[source]

Bases: CommonHandler

Handler for Q.complex Test that an expression belongs to the field of complex numbers

static Abs(expr, assumptions)
static Add(expr, assumptions)[source]
static Determinant(expr, assumptions)
static Expr(expr, assumptions)[source]
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static MatrixElement(expr, assumptions)[source]
static Mul(expr, assumptions)
static NegativeInfinity(expr, assumptions)
static Number(expr, assumptions)
static NumberSymbol(expr, assumptions)
static Pow(expr, assumptions)
static Trace(expr, assumptions)
static cos(expr, assumptions)
static exp(expr, assumptions)
static im(expr, assumptions)
static log(expr, assumptions)
static re(expr, assumptions)
static sin(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.sets.AskExtendedRealHandler[source]

Bases: AskRealHandler

Handler for Q.extended_real Test that an expression belongs to the field of extended real numbers, that is real numbers union {Infinity, -Infinity}

static Add(expr, assumptions)[source]

Real + Real -> Real Real + (Complex & !Real) -> !Real

static Infinity(expr, assumptions)
static Mul(expr, assumptions)

Real*Real -> Real Real*Imaginary -> !Real Imaginary*Imaginary -> Real

static NegativeInfinity(expr, assumptions)
static Pow(expr, assumptions)

Real**Integer -> Real Positive**Real -> Real Real**(Integer/Even) -> Real if base is nonnegative Real**(Integer/Odd) -> Real Imaginary**(Integer/Even) -> Real Imaginary**(Integer/Odd) -> not Real Imaginary**Real -> ? since Real could be 0 (giving real) or 1 (giving imaginary) b**Imaginary -> Real if log(b) is imaginary and b != 0 and exponent != integer multiple of I*pi/log(b) Real**Real -> ? e.g. sqrt(-1) is imaginary and sqrt(2) is not

class modelparameters.sympy.assumptions.handlers.sets.AskHermitianHandler[source]

Bases: AskRealHandler

Handler for Q.hermitian Test that an expression belongs to the field of Hermitian operators

static Add(expr, assumptions)[source]

Hermitian + Hermitian -> Hermitian Hermitian + !Hermitian -> !Hermitian

static Mul(expr, assumptions)[source]

As long as there is at most only one noncommutative term: Hermitian*Hermitian -> Hermitian Hermitian*Antihermitian -> !Hermitian Antihermitian*Antihermitian -> Hermitian

static Pow(expr, assumptions)[source]

Hermitian**Integer -> Hermitian

static cos(expr, assumptions)
static exp(expr, assumptions)
static sin(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.sets.AskImaginaryHandler[source]

Bases: CommonHandler

Handler for Q.imaginary Test that an expression belongs to the field of imaginary numbers, that is, numbers in the form x*I, where x is real

static Add(expr, assumptions)[source]

Imaginary + Imaginary -> Imaginary Imaginary + Complex -> ? Imaginary + Real -> !Imaginary

static Expr(expr, assumptions)[source]
static ImaginaryUnit(expr, assumptions)
static Mul(expr, assumptions)[source]

Real*Imaginary -> Imaginary Imaginary*Imaginary -> Real

static Number(expr, assumptions)[source]
static NumberSymbol(expr, assumptions)
static Pow(expr, assumptions)[source]

Imaginary**Odd -> Imaginary Imaginary**Even -> Real b**Imaginary -> !Imaginary if exponent is an integer multiple of I*pi/log(b) Imaginary**Real -> ? Positive**Real -> Real Negative**Integer -> Real Negative**(Integer/2) -> Imaginary Negative**Real -> not Imaginary if exponent is not Rational

static exp(expr, assumptions)[source]
static log(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.sets.AskIntegerHandler[source]

Bases: CommonHandler

Handler for Q.integer Test that an expression belongs to the field of integer numbers

static Abs(expr, assumptions)[source]
static Add(expr, assumptions)[source]

Integer + Integer -> Integer Integer + !Integer -> !Integer !Integer + !Integer -> ?

static Determinant(expr, assumptions)
static Exp1(expr, assumptions)
static Expr(expr, assumptions)[source]
static GoldenRatio(expr, assumptions)
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static Integer(expr, assumptions)
static MatrixElement(expr, assumptions)[source]
static Mul(expr, assumptions)[source]

Integer*Integer -> Integer Integer*Irrational -> !Integer Odd/Even -> !Integer Integer*Rational -> ?

static NegativeInfinity(expr, assumptions)
static Pi(expr, assumptions)
static Pow(expr, assumptions)

Integer + Integer -> Integer Integer + !Integer -> !Integer !Integer + !Integer -> ?

static Rational(expr, assumptions)[source]
static Trace(expr, assumptions)
static int(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.sets.AskIrrationalHandler[source]

Bases: CommonHandler

static Basic(expr, assumptions)[source]
static Expr(expr, assumptions)[source]
class modelparameters.sympy.assumptions.handlers.sets.AskRationalHandler[source]

Bases: CommonHandler

Handler for Q.rational Test that an expression belongs to the field of rational numbers

static Add(expr, assumptions)[source]

Rational + Rational -> Rational Rational + !Rational -> !Rational !Rational + !Rational -> ?

static Exp1(expr, assumptions)
static Expr(expr, assumptions)[source]
static Float(expr, assumptions)
static GoldenRatio(expr, assumptions)
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static Mul(expr, assumptions)

Rational + Rational -> Rational Rational + !Rational -> !Rational !Rational + !Rational -> ?

static NegativeInfinity(expr, assumptions)
static Pi(expr, assumptions)
static Pow(expr, assumptions)[source]

Rational ** Integer -> Rational Irrational ** Rational -> Irrational Rational ** Irrational -> ?

static Rational(expr, assumptions)
static acos(expr, assumptions)
static acot(expr, assumptions)
static asin(expr, assumptions)
static atan(expr, assumptions)
static cos(expr, assumptions)
static cot(expr, assumptions)[source]
static exp(expr, assumptions)[source]
static log(expr, assumptions)[source]
static sin(expr, assumptions)
static tan(expr, assumptions)
class modelparameters.sympy.assumptions.handlers.sets.AskRealHandler[source]

Bases: CommonHandler

Handler for Q.real Test that an expression belongs to the field of real numbers

static Abs(expr, assumptions)
static Add(expr, assumptions)[source]

Real + Real -> Real Real + (Complex & !Real) -> !Real

static Determinant(expr, assumptions)
static Exp1(expr, assumptions)
static Expr(expr, assumptions)[source]
static Float(expr, assumptions)
static GoldenRatio(expr, assumptions)
static ImaginaryUnit(expr, assumptions)
static Infinity(expr, assumptions)
static MatrixElement(expr, assumptions)[source]
static Mul(expr, assumptions)[source]

Real*Real -> Real Real*Imaginary -> !Real Imaginary*Imaginary -> Real

static NegativeInfinity(expr, assumptions)
static Pi(expr, assumptions)
static Pow(expr, assumptions)[source]

Real**Integer -> Real Positive**Real -> Real Real**(Integer/Even) -> Real if base is nonnegative Real**(Integer/Odd) -> Real Imaginary**(Integer/Even) -> Real Imaginary**(Integer/Odd) -> not Real Imaginary**Real -> ? since Real could be 0 (giving real) or 1 (giving imaginary) b**Imaginary -> Real if log(b) is imaginary and b != 0 and exponent != integer multiple of I*pi/log(b) Real**Real -> ? e.g. sqrt(-1) is imaginary and sqrt(2) is not

static Rational(expr, assumptions)
static Trace(expr, assumptions)
static cos(expr, assumptions)
static exp(expr, assumptions)[source]
static im(expr, assumptions)
static log(expr, assumptions)[source]
static re(expr, assumptions)
static sin(expr, assumptions)[source]

Module contents