#NEWLINE# def test_isotonic_sample_weight( ) : #NEWLINE# #INDENT# ir = IsotonicRegression ( ) #NEWLINE# x = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] #NEWLINE# y = [ 1 , 41 , 51 , 1 , 2 , 5 , 24 ] #NEWLINE# sample_weight = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 ] #NEWLINE# expected_y = [ 1 , 13.95 , 13.95 , 13.95 , 13.95 , 13.95 , 24 ] #NEWLINE# received_y = ir . fit_transform ( x , y , sample_weight = x ) #NEWLINE# assert_array_equal ( expected_y , received_y )