From 85f37a7abfbc3bf304ca4ef3593dbaeda1e9bd11 Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Mon, 15 Nov 2021 14:38:21 +0000 Subject: [PATCH] docs: details about jackknife conversion added --- pyerrors/obs.py | 3 ++- tests/obs_test.py | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyerrors/obs.py b/pyerrors/obs.py index 2204a429..4fbda90f 100644 --- a/pyerrors/obs.py +++ b/pyerrors/obs.py @@ -567,7 +567,8 @@ class Obs: for the given ensemble and replicum. The zeroth entry of the array contains the mean value of the Obs, entries 1 to N contain the N jackknife samples derived from the Obs. The current implementation only works for observables - defined on exactly one ensemble and replicum. + defined on exactly one ensemble and replicum. The derived jackknife samples + should agree with samples from a full jackknife analysis up to O(1/N). """ if len(self.names) != 1: diff --git a/tests/obs_test.py b/tests/obs_test.py index 7ce035ab..f0adcc49 100644 --- a/tests/obs_test.py +++ b/tests/obs_test.py @@ -519,3 +519,6 @@ def test_jackknife(): tmp_jacks[i + 1] = (n * mean - full_data[i]) / (n - 1) assert np.allclose(tmp_jacks, my_obs.export_jackknife()) + my_new_obs = my_obs + pe.Obs([full_data], ['test2']) + with pytest.raises(Exception): + my_new_obs.export_jackknife()