utils

exception pydy.utils.PyDyDeprecationWarning[source]
exception pydy.utils.PyDyFutureWarning[source]
exception pydy.utils.PyDyImportWarning[source]
exception pydy.utils.PyDyUserWarning[source]
pydy.utils.find_dynamicsymbols(expression, exclude=None)[source]

Find all dynamicsymbols in expression.

>>> from sympy.physics.mechanics import dynamicsymbols, find_dynamicsymbols
>>> x, y = dynamicsymbols('x, y')
>>> expr = x + x.diff()*y
>>> find_dynamicsymbols(expr)
set([x(t), y(t), Derivative(x(t), t)])

If the optional exclude kwarg is used, only dynamicsymbols not in the iterable exclude are returned.

>>> find_dynamicsymbols(expr, [x, y])
set([Derivative(x(t), t)])
pydy.utils.sympy_equal_to_or_newer_than(version, installed_version=None)[source]

Returns true if the installed version of SymPy is equal to or newer than the provided version string.

pydy.utils.sympy_newer_than(version)[source]

Returns true if the installed version of SymPy is newer than the provided version string.

pydy.utils.wrap_and_indent(lines, indentation=4, width=79, continuation=None, comment=None)[source]

Returns a single string in which the lines have been indented and wrapped into a block of text.

Parameters
indentationinteger

The number of characters to indent.

widthinteger

The maximum line width.

continuationstring

The continuation characters.

commentstring

The character that designates a comment line.