def test_gnb_priors():
 clf = GaussianNB(priors=np.array([0.3, 0.7])).fit(X, y)
 assert_array_almost_equal(clf.predict_proba([[(-0.1), (-0.1)]]), np.array([[0.825303662161683, 0.174696337838317]]), 8)
 assert_array_equal(clf.class_prior_, np.array([0.3, 0.7]))

def test_gnb_priors ( ) : clf = GaussianNB ( priors = np . array ( [ 0.3 , 0.7 ] ) ) . fit ( X , y ) assert_array_almost_equal ( clf . predict_proba ( [ [ ( - 0.1 ) , ( - 0.1 ) ] ] ) , np . array ( [ [ 0.825303662161683 , 0.174696337838317 ] ] ) , 8 ) assert_array_equal ( clf . class_prior_ , np . array ( [ 0.3 , 0.7 ] ) )
test whether the class prior override is properly used .