@@ -61,6 +61,8 @@ def test_covariance():
6161 X_1sample = np .arange (5 )
6262 cov = EmpiricalCovariance ()
6363 assert_warns (UserWarning , cov .fit , X_1sample )
64+ assert_array_almost_equal (cov .covariance_ ,
65+ np .zeros (shape = (5 , 5 ), dtype = np .float64 ))
6466
6567 # test integer type
6668 X_integer = np .asarray ([[0 , 1 ], [1 , 0 ]])
@@ -181,9 +183,11 @@ def test_ledoit_wolf():
181183
182184 # test with one sample
183185 # FIXME I don't know what this test does
184- #X_1sample = np.arange(5)
185- #lw = LedoitWolf()
186- #assert_warns(UserWarning, lw.fit, X_1sample)
186+ X_1sample = np .arange (5 )
187+ lw = LedoitWolf ()
188+ assert_warns (UserWarning , lw .fit , X_1sample )
189+ assert_array_almost_equal (lw .covariance_ ,
190+ np .zeros (shape = (5 , 5 ), dtype = np .float64 ))
187191
188192 # test shrinkage coeff on a simple data set (without saving precision)
189193 lw = LedoitWolf (store_precision = False )
@@ -253,9 +257,11 @@ def test_oas():
253257
254258 # test with one sample
255259 # FIXME I don't know what this test does
256- #X_1sample = np.arange(5)
257- #oa = OAS()
258- #assert_warns(UserWarning, oa.fit, X_1sample)
260+ X_1sample = np .arange (5 )
261+ oa = OAS ()
262+ assert_warns (UserWarning , oa .fit , X_1sample )
263+ assert_array_almost_equal (oa .covariance_ ,
264+ np .zeros (shape = (5 , 5 ), dtype = np .float64 ))
259265
260266 # test shrinkage coeff on a simple data set (without saving precision)
261267 oa = OAS (store_precision = False )
0 commit comments