From 92a89fc65dea8ba39574677830395ce05e7bb04e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franz=20Kir=C3=A1ly?= Date: Sun, 10 Sep 2023 13:29:33 +0200 Subject: [PATCH] Update empirical.py --- skpro/distributions/empirical.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skpro/distributions/empirical.py b/skpro/distributions/empirical.py index f69a91393..493f4d290 100644 --- a/skpro/distributions/empirical.py +++ b/skpro/distributions/empirical.py @@ -367,7 +367,7 @@ def _energy_np(spl, x=None, weights=None, assume_sorted=False): if x is None: cum_fwd = np.cumsum(weights[:-1]) - cum_back = np.cumsum(weights[1::-1])[::-1] + cum_back = np.cumsum(weights[1:][::-1])[::-1] energy = 2 * np.sum(cum_fwd * cum_back * spl_diff) else: spl_diff = np.abs(spl - x)