Skip to content

Commit dbdf90e

Browse files
author
kyri-petrou
committed
Remove unecessary extra variable
1 parent 721f141 commit dbdf90e

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

windpowerlib/power_output.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -286,15 +286,11 @@ def _get_power_output(
286286
:numpy:`numpy.array`
287287
Electrical power output of the wind turbine in W.
288288
"""
289-
# Create a new empty power curves array which which can be used t
290-
power_curve_exponent = np.interp(
291-
power_curve_wind_speeds, [7.5, 12.5], [1 / 3, 2 / 3]
292-
)
293-
294289
# Calculate the power curves for each timestep using vectors
295290
# NOTE: power_curves_per_ts.shape = [len(wind_speed), len(density)]
296291
power_curves_per_ts = (
297-
(1.225 / density).reshape(-1, 1) ** power_curve_exponent
292+
(1.225 / density).reshape(-1, 1)
293+
** np.interp(power_curve_wind_speeds, [7.5, 12.5], [1 / 3, 2 / 3])
298294
) * power_curve_wind_speeds
299295

300296
# Create the interpolation function

0 commit comments

Comments
 (0)