Skip to content

Commit 2653387

Browse files
author
kyri-petrou
committed
Use def instead of lambda
1 parent dbdf90e commit 2653387

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

windpowerlib/power_output.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,11 @@ def _get_power_output(
294294
) * power_curve_wind_speeds
295295

296296
# Create the interpolation function
297-
interp_func = lambda w_speed, p_curves: np.interp(
298-
w_speed, p_curves, power_curve_values, left=0, right=0
299-
)
297+
def interp_func(w_speed, p_curves):
298+
return np.interp(
299+
w_speed, p_curves, power_curve_values, left=0, right=0
300+
)
301+
300302
# Calculate the power output by mapping the arrays to the interp function
301303
power_output = np.array(
302304
list(map(interp_func, wind_speed, power_curves_per_ts))

0 commit comments

Comments
 (0)