From b3a680fdc9fc14351b270c2d970f50e0b007a3fa Mon Sep 17 00:00:00 2001 From: emeeubc <117220776+emeeubc@users.noreply.github.com> Date: Tue, 14 Nov 2023 10:11:54 -0800 Subject: [PATCH] minisom.py Update test_pca_weights_init. Redefine expected array. --- minisom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/minisom.py b/minisom.py index 2380e0e..780f853 100644 --- a/minisom.py +++ b/minisom.py @@ -864,10 +864,10 @@ def test_random_weights_init(self): def test_pca_weights_init(self): som = MiniSom(2, 2, 2) som.pca_weights_init(array([[1., 0.], [0., 1.], [1., 0.], [0., 1.]])) - expected = array([[[-1.41421356, 0.], - [0., 1.41421356]], - [[0., -1.41421356], - [1.41421356, 0.]]]) + expected = array([[[1.57735027, -0.42264973], + [0.42264973, -1.57735027]], + [[-0.42264973, 1.57735027], + [-1.57735027, 0.42264973]]]) assert_array_almost_equal(som._weights, expected) def test_distance_map(self):