pysym package

pysym is a minimal symbolic manipulation framework

Submodules

pysym.core module

class pysym.core.Abs(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Add(*args)[source]

Bases: pysym.core.Reduction

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
insert_mult(factor)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
classmethod create(args)[source]
diff(wrt)[source]
evalf()[source]
insert_mult(factor)[source]
class pysym.core.Atomic(*args)[source]

Bases: pysym.core.Basic

Methods

create(args)
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
args
expand()[source]
found_in(flat_iterable)[source]
has(instance)[source]
is_atomic()[source]
class pysym.core.Basic(*args)[source]

Bases: object

Methods

create(args)
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
args
classmethod create(args)[source]
expand()[source]
found_in(flat_iterable)[source]
has(instance)[source]
is_atomic()[source]
is_zero()[source]
subs(subs_dict)[source]
class pysym.core.Binary(a, b)[source]

Bases: pysym.core.Operator

Methods

create(args)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
pysym.core.Dummy()[source]
class pysym.core.Eq(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Fraction(a, b)[source]

Bases: pysym.core.Binary

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
classmethod create(args)[source]
diff(wrt)[source]
evalf()[source]
class pysym.core.Function(*args)[source]

Bases: pysym.core.Basic

Methods

create(args)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
evalf()[source]
class pysym.core.Function1(*args)[source]

Bases: pysym.core.Function

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
diff(wrt)[source]
class pysym.core.Ge(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Gt(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.ITE(cond, if_true, if_false)[source]

Bases: pysym.core.Basic

Methods

create(args)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
evalf()[source]
class pysym.core.Le(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Lt(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Matrix(nrows, ncols, source)[source]

Bases: pysym.core.Basic

Attributes

ncols
nrows
shape

Methods

create(args)
evalf()
expand()
flatten()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
jacobian(iterable)
subs(subs_dict)
evalf()[source]
flatten()[source]
jacobian(iterable)[source]
ncols
nrows
shape
class pysym.core.Mul(*args)[source]

Bases: pysym.core.Reduction

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
classmethod create(args)[source]
diff(wrt)[source]
expand()[source]
class pysym.core.Ne(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Not(*args)[source]

Bases: pysym.core.Relational

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.Number(*args)[source]

Bases: pysym.core.Atomic

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
make(arg)
subs(subs_dict)
diff(wrt)[source]
evalf()[source]
is_zero()[source]
classmethod make(arg)[source]
class pysym.core.Operator(*args)[source]

Bases: pysym.core.Basic

Methods

create(args)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
evalf()[source]
sorted()[source]
class pysym.core.Pow(a, b)[source]

Bases: pysym.core.Binary

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
classmethod create(args)[source]
diff(wrt)[source]
evalf()[source]
class pysym.core.Reduction(*args)[source]

Bases: pysym.core.Operator

Methods

create(args)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
classmethod create(args)[source]
evalf()[source]
class pysym.core.Relational(*args)[source]

Bases: pysym.core.Basic

Methods

create(args)
evalb()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
evalb()[source]
class pysym.core.Sub(a, b)[source]

Bases: pysym.core.Binary

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
sorted()
subs(subs_dict)
classmethod create(args)[source]
diff(wrt)[source]
class pysym.core.Symbol(*args)[source]

Bases: pysym.core.Atomic

Methods

create(args)
diff(instance)
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
diff(instance)[source]
class pysym.core.Vector(*args)[source]

Bases: pysym.core.Basic

Methods

create(args)
diff(wrt)
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
diff(wrt)[source]
class pysym.core.acos(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.asin(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.atan(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
pysym.core.collect(sorted_args, collect_to)[source]
class pysym.core.cos(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.exp(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.gamma(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.log(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
pysym.core.merge(args, mrg_cls=None)[source]
pysym.core.merge_drop_sort_collect(args, collect_to, drop=(), mrg_cls=None)[source]
class pysym.core.sin(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.sqrt(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)
class pysym.core.tan(*args)[source]

Bases: pysym.core.Function1

Methods

create(args)
diff(wrt)
evalf()
expand()
found_in(flat_iterable)
has(instance)
is_atomic()
is_zero()
subs(subs_dict)

pysym.util module

class pysym.util.Lambdify(syms, exprs)[source]

Bases: object

Lambdify mimics symengine.Lambdify

Methods

__call__(inp[, out])
pysym.util.lambdify(args, exprs)[source]

lambdify mimics sympy.lambdify

pysym.util.symarray(prefix, shape)[source]
pysym.util.symbols(s)[source]

mimics sympy.symbols