@@ -86,9 +86,8 @@ def interpolate_ev(
86
86
if x_train .size < 2 :
87
87
if not extrapolation :
88
88
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 )
92
91
93
92
# warn if values are being extrapolated
94
93
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(
100
99
elif extrapolation == 'extrapolate_constant' :
101
100
if not all (sorted (x_train ) == x_train ):
102
101
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 )
104
103
else :
105
104
fill_value = np .nan
106
105
@@ -151,13 +150,11 @@ def stepfunction_ev(
151
150
x_test , x_train , y_train , None , None , x_threshold , y_threshold
152
151
)
153
152
154
-
155
-
156
153
# handle case of small training data sizes
157
154
if x_train .size < 2 :
158
155
LOGGER .warning ('Data is being extrapolated.' )
159
156
return _interpolate_small_input (x_test , x_train , y_train , None , y_asymptotic )
160
-
157
+
161
158
# warn if values are being extrapolated
162
159
if (np .min (x_test ) < np .min (x_train ) or np .max (x_test ) > np .max (x_train )):
163
160
LOGGER .warning ('Data is being extrapolated.' )
0 commit comments