Skip to content

Commit

Permalink
unit test improv
Browse files Browse the repository at this point in the history
  • Loading branch information
JustGlowing committed Aug 28, 2024
1 parent 336b4aa commit 69ea2e9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions minisom.py
Original file line number Diff line number Diff line change
Expand Up @@ -910,9 +910,8 @@ def test_quantization(self):
assert q[1] == 2.0

def test_divergence_measure(self):
test_data = array([[4], [2]])

# test that doesn't use vectorization
test_data = array([[4], [2]])
r = 0
for d in test_data:
for i in self.som._neigx:
Expand All @@ -927,7 +926,6 @@ def test_divergence_measure(self):
som = MiniSom(2, 1, 2, random_seed=1)
som._weights = array([[[0., 1.]], [[1., 0.]]])
test_data = array([[1., 0.], [0., 1.]])

h1 = som.neighborhood(som.winner(test_data[0]), som._sigma)
h2 = som.neighborhood(som.winner(test_data[1]), som._sigma)
r = h1[0][0] * sqrt(2) + h1[1][0] * 0
Expand Down

0 comments on commit 69ea2e9

Please sign in to comment.