@@ -57,26 +57,26 @@ def test_mds_pca_init(self):
5757 n_components = 2 , dissimilarity = Euclidean , init_type = 'PCA' ,
5858 n_init = 1 )
5959 X = projector (self .iris ).embedding_
60- np .testing .assert_array_almost_equal (X [0 ], result )
60+ np .testing .assert_allclose (X [0 ], result , rtol = 1e-3 )
6161
6262 projector = MDS (
6363 n_components = 2 , dissimilarity = 'precomputed' , init_type = 'PCA' ,
6464 n_init = 1 )
6565 X = projector (Euclidean (self .iris )).embedding_
66- np .testing .assert_array_almost_equal (X [0 ], result )
66+ np .testing .assert_allclose (X [0 ], result , rtol = 1e-3 )
6767
6868 projector = MDS (
6969 n_components = 2 , dissimilarity = 'euclidean' , init_type = 'PCA' ,
7070 n_init = 1 )
7171 X = projector (self .iris ).embedding_
72- np .testing .assert_array_almost_equal (X [0 ], result )
72+ np .testing .assert_allclose (X [0 ], result , rtol = 1e-3 )
7373
7474 projector = MDS (
7575 n_components = 6 , dissimilarity = 'euclidean' , init_type = 'PCA' ,
7676 n_init = 1 )
7777 X = projector (self .iris [:5 ]).embedding_
78- result = np .array ([- 0.31871 , - 0.064644 , 0.015653 , - 1.5e-08 , - 4.3e-11 , 0 ])
79- np .testing .assert_array_almost_equal (np .abs (X [0 ]), np .abs (result ))
78+ result = np .array ([- 0.31871 , - 0.064644 , 0.015653 , 0 , 0 , 0 ])
79+ np .testing .assert_allclose (np .abs (X [0 ]), np .abs (result ), rtol = 1e-3 )
8080
8181 def test_isomap (self ):
8282 for i in range (1 , 4 ):
0 commit comments