From cd8f1292bd516fa80efc02e28d95b5f6af3d3521 Mon Sep 17 00:00:00 2001 From: Hans Dembinski Date: Fri, 21 Jun 2024 19:11:01 +0200 Subject: [PATCH] fix --- src/resample/jackknife.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/resample/jackknife.py b/src/resample/jackknife.py index 066d9cd..efe3dc0 100644 --- a/src/resample/jackknife.py +++ b/src/resample/jackknife.py @@ -317,8 +317,9 @@ def variance( >>> from resample.jackknife import variance >>> import numpy as np >>> x = np.arange(10) - >>> round(variance(np.mean, x), 1) - 0.9 + >>> v = variance(np.mean, x) + >>> f"{v:.1f}" + '0.9' """ # formula is (n - 1) / n * sum((fj - mean(fj)) ** 2)