@@ -86,9 +86,8 @@ def interpolate_ev(
8686 if x_train .size < 2 :
8787 if not extrapolation :
8888 return np .full_like (x_test , np .nan )
89- else :
90- LOGGER .warning ('Data is being extrapolated.' )
91- return _interpolate_small_input (x_test , x_train , y_train , logy , y_asymptotic )
89+ LOGGER .warning ('Data is being extrapolated.' )
90+ return _interpolate_small_input (x_test , x_train , y_train , logy , y_asymptotic )
9291
9392 # warn if values are being extrapolated
9493 if extrapolation and (np .min (x_test ) < np .min (x_train ) or np .max (x_test ) > np .max (x_train )):
@@ -100,7 +99,7 @@ def interpolate_ev(
10099 elif extrapolation == 'extrapolate_constant' :
101100 if not all (sorted (x_train ) == x_train ):
102101 raise ValueError ('x_train array must be sorted in ascending order.' )
103- fill_value = (y_train [0 ], np .log10 (y_asymptotic ) if logy else y_asymptotic )
102+ fill_value = (y_train [0 ], np .log10 (y_asymptotic ) if logy else y_asymptotic )
104103 else :
105104 fill_value = np .nan
106105
@@ -151,13 +150,11 @@ def stepfunction_ev(
151150 x_test , x_train , y_train , None , None , x_threshold , y_threshold
152151 )
153152
154-
155-
156153 # handle case of small training data sizes
157154 if x_train .size < 2 :
158155 LOGGER .warning ('Data is being extrapolated.' )
159156 return _interpolate_small_input (x_test , x_train , y_train , None , y_asymptotic )
160-
157+
161158 # warn if values are being extrapolated
162159 if (np .min (x_test ) < np .min (x_train ) or np .max (x_test ) > np .max (x_train )):
163160 LOGGER .warning ('Data is being extrapolated.' )
0 commit comments