Decorator

sympy.utilities.decorator.conserve_mpmath_dps(func)[source]

After the function finishes, resets the value of mpmath.mp.dps to the value it had before the function was run.

sympy.utilities.decorator.threaded(func)[source]

Apply func to sub–elements of an object, including Add.

This decorator is intended to make it uniformly possible to apply a function to all elements of composite objects, e.g. matrices, lists, tuples and other iterable containers, or just expressions.

This version of threaded() decorator allows threading over elements of Add class. If this behavior is not desirable use xthreaded() decorator.

Functions using this decorator must have the following signature:

@threaded
def function(expr, *args, **kwargs):
sympy.utilities.decorator.threaded_factory(func, use_add)[source]

A factory for threaded decorators.

sympy.utilities.decorator.xthreaded(func)[source]

Apply func to sub–elements of an object, excluding Add.

This decorator is intended to make it uniformly possible to apply a function to all elements of composite objects, e.g. matrices, lists, tuples and other iterable containers, or just expressions.

This version of threaded() decorator disallows threading over elements of Add class. If this behavior is not desirable use threaded() decorator.

Functions using this decorator must have the following signature:

@xthreaded
def function(expr, *args, **kwargs):

Previous topic

Cython Utilities

Next topic

Iterables

This Page