#NEWLINE# def test_corner_cases( self ) : #NEWLINE# #INDENT# x = np . array ( [ ( - 1 ) , 0 , 1 ] ) #NEWLINE# y = np . array ( [ 2 , 0 , 1 ] ) #NEWLINE# x_test = np . array ( [ ( - 0.5 ) , 0.5 ] ) #NEWLINE# y_true = np . array ( [ ( 5 / 8 ) , ( 1 / 8 ) ] ) #NEWLINE# cs = CubicSpline ( x , y ) #NEWLINE# assert_allclose ( cs ( x_test ) , y_true , rtol = 1e-12 ) #NEWLINE# x = np . array ( [ ( - 1 ) , 1 ] ) #NEWLINE# y = np . array ( [ ( - 1 ) , 3 ] ) #NEWLINE# y_true = np . array ( [ 0 , 2 ] ) #NEWLINE# cs = CubicSpline ( x , y ) #NEWLINE# assert_allclose ( cs ( x_test ) , y_true , rtol = 1e-12 )