From 5077dfaad2c62043b8a041de864d492319a12a3a Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Fri, 29 Oct 2021 15:49:17 +0100 Subject: [PATCH] additional test for irregular Obs added --- tests/pyerrors_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/pyerrors_test.py b/tests/pyerrors_test.py index 9eaced7e..38db1517 100644 --- a/tests/pyerrors_test.py +++ b/tests/pyerrors_test.py @@ -280,6 +280,15 @@ def test_irregular_error_propagation(): regular_obs = pe.Obs([np.random.rand(1000)], ['t']) irregular_obs = pe.Obs([np.random.rand(500)], ['t'], idl=[range(1, 1000, 2)]) assert regular_obs == (regular_obs / irregular_obs) * irregular_obs + assert regular_obs == (regular_obs + irregular_obs) - irregular_obs + + irregular_obs = pe.Obs([np.random.rand(6)], ['t'], idl=[[4, 18, 27, 29, 57, 80]]) + assert regular_obs == (regular_obs / irregular_obs) * irregular_obs + assert regular_obs == (regular_obs + irregular_obs) - irregular_obs + + irregular_obs = pe.Obs([np.random.rand(500)], ['t'], idl=[list(range(1, 251)) + list(range(500, 1000, 2))]) + assert regular_obs == (regular_obs / irregular_obs) * irregular_obs + assert regular_obs == (regular_obs + irregular_obs) - irregular_obs def test_gamma_method_irregular():