pystencils.sympyextensions.math.remove_small_floats#
- pystencils.sympyextensions.math.remove_small_floats(expr, threshold)#
Removes all sp.Float objects whose absolute value is smaller than threshold
>>> expr = sp.sympify("x + 1e-15 * y") >>> remove_small_floats(expr, 1e-14) x