mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-03-16 15:20:24 +01:00
Merge branch 'develop' into documentation
This commit is contained in:
commit
a6abdb87b1
2 changed files with 7 additions and 1 deletions
|
@ -459,7 +459,7 @@ class Obs:
|
|||
atol : float
|
||||
Absolute tolerance (for details see numpy documentation).
|
||||
"""
|
||||
return (np.isclose(0.0, self.value, rtol, atol) and all(np.allclose(0.0, delta, rtol, atol) for delta in self.deltas.values()) and all(np.allclose(0.0, delta.grad, rtol, atol) for delta in self.covobs.values()))
|
||||
return np.isclose(0.0, self.value, rtol, atol) and all(np.allclose(0.0, delta, rtol, atol) for delta in self.deltas.values()) and all(np.allclose(0.0, delta.errsq(), rtol, atol) for delta in self.covobs.values())
|
||||
|
||||
def plot_tauint(self, save=None):
|
||||
"""Plot integrated autocorrelation time for each ensemble.
|
||||
|
|
|
@ -581,3 +581,9 @@ def test_covobs():
|
|||
|
||||
do = cl[0] * cl[1]
|
||||
assert(np.array_equal(do.covobs['rAP'].grad, np.transpose([pi[1], pi[0]]).reshape(2, 1)))
|
||||
|
||||
|
||||
def test_covobs_overloading():
|
||||
covobs = pe.cov_Obs([0.5, 0.5], np.array([[0.02, 0.02], [0.02, 0.02]]), 'Zfactor')
|
||||
assert (covobs[0] / covobs[1]) == 1
|
||||
assert (covobs[0] - covobs[1]) == 0
|
||||
|
|
Loading…
Add table
Reference in a new issue