recursive_args

typhon.physics.metrology.recursive_args(expr, stop_at=None, partial_at=None)[source]

Get arguments for expr, stopping at certain types

Get all arguments in expression down to the levels in expr. When expr is only {sympy.Symbol} this is identical to expr.free_symbols, but in some cases we want to retain IndexedBase, for example, when evaluating uncertainies.

This is mainly a helper for express_uncertainty where we don’t want to descend beyond Indexed quantities