#NEWLINE# def test_linear( self ) : #NEWLINE# #INDENT# interp10 = interp1d ( self . x10 , self . y10 ) #NEWLINE# assert_array_almost_equal ( interp10 ( self . x10 ) , self . y10 ) #NEWLINE# assert_array_almost_equal ( interp10 ( 1.2 ) , np . array ( [ 1.2 ] ) ) #NEWLINE# assert_array_almost_equal ( interp10 ( [ 2.4 , 5.6 , 6.0 ] ) , np . array ( [ 2.4 , 5.6 , 6.0 ] ) ) #NEWLINE# extrapolator = interp1d ( self . x10 , self . y10 , kind = 'linear' , fill_value = 'extrapolate' ) #NEWLINE# assert_allclose ( extrapolator ( [ ( - 1.0 ) , 0 , 9 , 11 ] ) , [ ( - 1 ) , 0 , 9 , 11 ] , rtol = 1e-14 ) #NEWLINE# opts = dict ( kind = 'linear' , fill_value = 'extrapolate' , bounds_error = True ) #NEWLINE# assert_raises ( ValueError , interp1d , self . x10 , self . y10 , ** opts )