@@ -23,6 +23,7 @@ def test_initialize_nn_output():
23
23
assert_false ((W < 0 ).any () or (H < 0 ).any ())
24
24
25
25
26
+ @ignore_warnings
26
27
def test_parameter_checking ():
27
28
A = np .ones ((2 , 2 ))
28
29
name = 'spam'
@@ -65,6 +66,7 @@ def test_initialize_variants():
65
66
assert_true (np .allclose (evl [ref != 0 ], ref [ref != 0 ]))
66
67
67
68
69
+ @ignore_warnings
68
70
def test_nmf_fit_nn_output ():
69
71
# Test that the decomposition does not contain negative values
70
72
A = np .c_ [5 * np .ones (5 ) - np .arange (1 , 6 ),
@@ -78,6 +80,7 @@ def test_nmf_fit_nn_output():
78
80
(transf < 0 ).any ())
79
81
80
82
83
+ @ignore_warnings
81
84
def test_nmf_fit_close ():
82
85
# Test that the fit is not too far away
83
86
for solver in ('proj-grad' , 'coordinate' ):
@@ -101,6 +104,7 @@ def test_nls_close():
101
104
assert_true ((np .abs (Ap - A ) < 0.01 ).all ())
102
105
103
106
107
+ @ignore_warnings
104
108
def test_nmf_transform ():
105
109
# Test that NMF.transform returns close values
106
110
A = np .abs (random_state .randn (6 , 5 ))
@@ -139,6 +143,7 @@ def test_nmf_sparseness():
139
143
assert_greater (comp_sp , m .comp_sparseness_ )
140
144
141
145
146
+ @ignore_warnings
142
147
def test_sparse_input ():
143
148
# Test that sparse matrices are accepted as input
144
149
from scipy .sparse import csc_matrix
@@ -164,6 +169,7 @@ def test_sparse_input():
164
169
assert_array_almost_equal (H1 , H2 )
165
170
166
171
172
+ @ignore_warnings
167
173
def test_sparse_transform ():
168
174
# Test that transform works on sparse data. Issue #2124
169
175
from scipy .sparse import csc_matrix
@@ -179,6 +185,7 @@ def test_sparse_transform():
179
185
assert_array_almost_equal (A_fit_tr , A_tr , decimal = 2 )
180
186
181
187
188
+ @ignore_warnings
182
189
def test_non_negative_matrix_factorization_path ():
183
190
# Test path consistency between the class and the public function
184
191
A = np .abs (random_state .randn (10 , 10 ))
@@ -197,6 +204,7 @@ def test_non_negative_matrix_factorization_path():
197
204
assert_array_almost_equal (W_nmf_bis , W_cls_bis , decimal = 10 )
198
205
199
206
207
+ @ignore_warnings
200
208
def test_non_negative_matrix_factorization_checking ():
201
209
A = np .ones ((2 , 2 ))
202
210
# Test parameters checking is public function
0 commit comments