pydsm.utilities.chop¶
-
pydsm.utilities.
chop
(x, tol=2.220446049250313e-14)¶ Chop to zero input numbers that are close to zero.
- Parameters
- xfloat, complex or array_like
number to process
- tolfloat, optional
absolute tolerance. Defaults to 100 times the system epsilon.
- Returns
- yfloat
y is zero if x is close to zero according to the tolerance. Alternatively, y is x.
Notes
If the input is an array, it is always copied. See also is_negligible.