@@ -173,7 +173,7 @@ def test_base_hmm_attributes(self):
173173
174174 h = self .StubHMM (n_components )
175175
176- self .assertEquals (h .n_components , n_components )
176+ self .assertEqual (h .n_components , n_components )
177177
178178 h .startprob_ = startprob
179179 assert_array_almost_equal (h .startprob_ , startprob )
@@ -270,7 +270,7 @@ def test_sample(self, n=1000):
270270 h .startprob_ = self .startprob
271271
272272 samples = h .sample (n )[0 ]
273- self .assertEquals (samples .shape , (n , self .n_features ))
273+ self .assertEqual (samples .shape , (n , self .n_features ))
274274
275275 def test_fit (self , params = 'stmc' , n_iter = 5 , verbose = False , ** kwargs ):
276276 h = hmm .GaussianHMM (self .n_components , self .covariance_type )
@@ -456,7 +456,7 @@ def test_predict(self):
456456 def test_attributes (self ):
457457 h = hmm .MultinomialHMM (self .n_components )
458458
459- self .assertEquals (h .n_components , self .n_components )
459+ self .assertEqual (h .n_components , self .n_components )
460460
461461 h .startprob_ = self .startprob
462462 assert_array_almost_equal (h .startprob_ , self .startprob )
@@ -479,7 +479,7 @@ def test_attributes(self):
479479 self .assertRaises (ValueError , h .__setattr__ , 'emissionprob_' , [])
480480 self .assertRaises (ValueError , h .__setattr__ , 'emissionprob_' ,
481481 np .zeros ((self .n_components - 2 , self .n_symbols )))
482- self .assertEquals (h .n_symbols , self .n_symbols )
482+ self .assertEqual (h .n_symbols , self .n_symbols )
483483
484484 def test_eval (self ):
485485 idx = np .repeat (range (self .n_components ), 10 )
@@ -493,8 +493,8 @@ def test_eval(self):
493493
494494 def test_sample (self , n = 1000 ):
495495 samples = self .h .sample (n )[0 ]
496- self .assertEquals (len (samples ), n )
497- self .assertEquals (len (np .unique (samples )), self .n_symbols )
496+ self .assertEqual (len (samples ), n )
497+ self .assertEqual (len (np .unique (samples )), self .n_symbols )
498498
499499 def test_fit (self , params = 'ste' , n_iter = 5 , verbose = False , ** kwargs ):
500500 h = self .h
@@ -586,7 +586,7 @@ def setUp(self):
586586 def test_attributes (self ):
587587 h = hmm .GMMHMM (self .n_components , covariance_type = self .covariance_type )
588588
589- self .assertEquals (h .n_components , self .n_components )
589+ self .assertEqual (h .n_components , self .n_components )
590590
591591 h .startprob_ = self .startprob
592592 assert_array_almost_equal (h .startprob_ , self .startprob )
@@ -628,7 +628,7 @@ def test_sample(self, n=1000):
628628 startprob = self .startprob , transmat = self .transmat ,
629629 gmms = self .gmms )
630630 samples = h .sample (n )[0 ]
631- self .assertEquals (samples .shape , (n , self .n_features ))
631+ self .assertEqual (samples .shape , (n , self .n_features ))
632632
633633 def test_fit (self , params = 'stmwc' , n_iter = 5 , verbose = False , ** kwargs ):
634634 h = hmm .GMMHMM (self .n_components , covars_prior = 1.0 )
0 commit comments