#NEWLINE# def test_isotonic_regression_auto_decreasing( ) : #NEWLINE# #INDENT# y = np . array ( [ 10 , 9 , 10 , 7 , 6 , 6.1 , 5 ] ) #NEWLINE# x = np . arange ( len ( y ) ) #NEWLINE# ir = IsotonicRegression ( increasing = 'auto' ) #NEWLINE# with warnings . catch_warnings ( record = True ) as w : #NEWLINE# #INDENT# warnings . simplefilter ( 'always' ) #NEWLINE# y_ = ir . fit_transform ( x , y ) #NEWLINE# assert_true ( all ( [ ( 'invalid value encountered in ' in str ( warn . message ) ) for warn in w ] ) ) #NEWLINE# #UNINDENT# is_increasing = ( y_ [ 0 ] < y_ [ ( - 1 ) ] ) #NEWLINE# assert_false ( is_increasing )