def test_multiclass_error():
 y = np.linspace(0, 1, 15)
 iht = InstanceHardnessThreshold(random_state=RND_SEED)
 assert_warns(UserWarning, iht.fit, X, y)
 y = np.array(((([0] * 10) + ([1] * 3)) + ([2] * 2)))
 iht = InstanceHardnessThreshold(random_state=RND_SEED)
 assert_warns(UserWarning, iht.fit, X, y)

def test_multiclass_error ( ) : y = np . linspace ( 0 , 1 , 15 ) iht = InstanceHardnessThreshold ( random_state = RND_SEED ) assert_warns ( UserWarning , iht . fit , X , y ) y = np . array ( ( ( ( [ 0 ] * 10 ) + ( [ 1 ] * 3 ) ) + ( [ 2 ] * 2 ) ) ) iht = InstanceHardnessThreshold ( random_state = RND_SEED ) assert_warns ( UserWarning , iht . fit , X , y )
test either if an error is raised when the target are not binary type .