#NEWLINE# def test_out_of_bounds_extrap2( self ) : #NEWLINE# #INDENT# ( points , values ) = self . _get_sample_4d_2 ( ) #NEWLINE# interp = RegularGridInterpolator ( points , values , bounds_error = False , fill_value = None ) #NEWLINE# sample = np . asarray ( [ [ ( - 0.1 ) , ( - 0.1 ) , ( - 0.1 ) , ( - 0.1 ) ] , [ 1.1 , 1.1 , 1.1 , 1.1 ] , [ 21 , 2.1 , ( - 1.1 ) , ( - 11 ) ] , [ 2.1 , 2.1 , ( - 1.1 ) , ( - 1.1 ) ] ] ) #NEWLINE# wanted = np . asarray ( [ 0.0 , 11.0 , 11.0 , 11.0 ] ) #NEWLINE# assert_array_almost_equal ( interp ( sample , method = 'nearest' ) , wanted ) #NEWLINE# wanted = np . asarray ( [ ( - 12.1 ) , 133.1 , ( - 1069.0 ) , ( - 97.9 ) ] ) #NEWLINE# assert_array_almost_equal ( interp ( sample , method = 'linear' ) , wanted )