mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
Obs.is_zero() now correctly detects when an Obs is zero within machine
precision
This commit is contained in:
parent
eedad7deda
commit
8655fe2cd1
1 changed files with 2 additions and 2 deletions
|
@ -359,7 +359,7 @@ class Obs:
|
|||
|
||||
Works only properly when the gamma method was run.
|
||||
"""
|
||||
return np.abs(self.value) <= sigma * self.dvalue
|
||||
return self.is_zero() or np.abs(self.value) <= sigma * self.dvalue
|
||||
|
||||
def is_zero(self):
|
||||
return np.isclose(0.0, self.value) and all(np.allclose(0.0, delta) for delta in self.deltas.values())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue