From b2e71c2807ccda663e17dba67da6cc4a52bb47a1 Mon Sep 17 00:00:00 2001 From: JustGlowing Date: Wed, 28 Aug 2024 11:32:04 +0100 Subject: [PATCH] divergence measure unit test - style --- minisom.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/minisom.py b/minisom.py index 1a8b0d9..25c1b21 100644 --- a/minisom.py +++ b/minisom.py @@ -914,10 +914,11 @@ def test_divergence_measure(self): r = 0 for d in test_data: for i in self.som._neigx: - for j in self.som._neigy: + for j in self.som._neigy: w = self.som.get_weights()[i, j] - h = self.som.neighborhood(self.som.winner(d), self.som._sigma)[i,j] - r += h * norm(d-w) + h = self.som.neighborhood(self.som.winner(d), + self.som._sigma)[i, j] + r += h * norm(d - w) assert_array_almost_equal(r, self.som.divergence_measure(test_data)) def test_random_seed(self):