mirror of
https://github.com/fjosw/pyerrors.git
synced 2025-05-14 19:43:41 +02:00
feat: computation of _covariance_element optimized, visualize option
added to covariance, tests adjusted.
This commit is contained in:
parent
c28d6131b1
commit
3796c0395f
2 changed files with 26 additions and 33 deletions
|
@ -39,8 +39,8 @@ def test_covobs():
|
|||
assert(np.isclose(oc.value, op.value, rtol=1e-14, atol=1e-14))
|
||||
|
||||
[o.gamma_method() for o in cl]
|
||||
assert(pe.covariance([cl[0], cl[1]])[0, 1] == cov[0][1])
|
||||
assert(pe.covariance([cl[0], cl[1]])[0, 1] == cov[1][0])
|
||||
assert(np.isclose(pe.covariance([cl[0], cl[1]])[0, 1], cov[0][1]))
|
||||
assert(np.isclose(pe.covariance([cl[0], cl[1]])[0, 1], cov[1][0]))
|
||||
|
||||
do = cl[0] * cl[1]
|
||||
assert(np.array_equal(do.covobs['rAP'].grad, np.transpose([pi[1], pi[0]]).reshape(2, 1)))
|
||||
|
@ -91,8 +91,8 @@ def test_covobs_covariance():
|
|||
|
||||
covariance = pe.covariance(x)
|
||||
|
||||
assert covariance[0, 0] == covariance[1, 1]
|
||||
assert covariance[0, 1] == a.dvalue ** 2 - b.dvalue ** 2
|
||||
assert np.isclose(covariance[0, 0], covariance[1, 1])
|
||||
assert np.isclose(covariance[0, 1], a.dvalue ** 2 - b.dvalue ** 2)
|
||||
|
||||
|
||||
def test_covobs_exceptions():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue