iode.Variables.threshold
- property Variables.threshold: float
Threshold under which the difference between 2 variables are considered equal.
The comparison test is: .. math:
\begin{cases} \frac{x_1 - x_2}{x_1} < \epsilon, & \text{if } x_1 \neq 0 \\ |x_2| < \epsilon, & \text{otherwise} \end{cases}
where \(x_1\) and \(x_2\) are the values of the variables to compare and \(\epsilon\) is the threshold value.
- Parameters:
- value: float
New threshold value.
Default value is 1e-7.
See also
Examples
>>> from iode import SAMPLE_DATA_DIR >>> from iode import variables >>> variables.load(f"{SAMPLE_DATA_DIR}/fun.var") Loading .../fun.var 394 objects loaded >>> variables.threshold 1e-07 >>> variables.threshold = 1e-5 >>> variables.threshold 1e-05