Skip to content

Commit 5993e70

Browse files
committed
Some small style issues
1 parent 3b8deae commit 5993e70

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

windpowerlib/power_output.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def power_curve_density_correction(
236236
+ "height is needed."
237237
)
238238

239-
# Convert pandas.Series to a numpy array to speed up the interpolation below.
239+
# Convert pd.Series to a numpy array to speed up the interpolation below.
240240
if isinstance(wind_speed, pd.Series):
241241
# save the indexes for later conversion to pd.Series
242242
wind_speed_indexes = wind_speed.index
@@ -266,13 +266,11 @@ def power_curve_density_correction(
266266
for i in range(len(wind_speed))
267267
]
268268

269-
# Power_output as pd.Series if wind_speed is pd.Series (else: np.array)
270-
if (
271-
panda_series
272-
): # use the flag to check if the data should be converted back to pandas.Series
269+
# Convert results to the data type of the input data
270+
if panda_series:
273271
power_output = pd.Series(
274272
data=power_output,
275-
index=wind_speed_indexes, # Use previously saved wind speed indexes
273+
index=wind_speed_indexes, # Use previously saved wind speed index
276274
name="feedin_power_plant",
277275
)
278276
else:

0 commit comments

Comments
 (0)