Tolerance.is_positive
- Tolerance.is_positive(a, tol=None)[source]
Check if a value can be considered a strictly positive number.
- Parameters:
- afloat
The value.
- tolfloat, optional
The absolute tolerance. Default is
None
, in which caseself.absolute
is used.
- Returns:
- bool
True
if the value is small enough to be considered zero.False
otherwise.
Examples
>>> tol = Tolerance() >>> tol.is_positive(1e-07) True >>> tol.is_positive(1e-10) False