pydsm.utilities.chop¶
- pydsm.utilities.chop(x, tol=2.2204460492503131e-14)¶
Chop to zero input numbers that are close to zero.
Parameters: x : float, complex or array_like
number to process
tol : float, optional
absolute tolerance. Defaults to 100 times the system epsilon.
Returns: y : float
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.