Skip to content

Commit

Permalink
Fixing style errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
stickler-ci committed Sep 15, 2020
1 parent 11a3210 commit 7c49763
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions windpowerlib/power_output.py
Expand Up @@ -236,7 +236,7 @@ def power_curve_density_correction(
+ "height is needed."
)

# Convert pandas.Series to a numpy array to speed up the interpolation below.
# Convert pandas.Series to a numpy array to speed up the interpolation below.
if isinstance(wind_speed, pd.Series):
# save the indexes for later conversion to pd.Series
wind_speed_indexes = wind_speed.index
Expand Down Expand Up @@ -267,7 +267,9 @@ def power_curve_density_correction(
]

# Power_output as pd.Series if wind_speed is pd.Series (else: np.array)
if panda_series: # use the flag to check if the data should be converted back to pandas.Series
if (
panda_series
): # use the flag to check if the data should be converted back to pandas.Series
power_output = pd.Series(
data=power_output,
index=wind_speed_indexes, # Use previously saved wind speed indexes
Expand Down

0 comments on commit 7c49763

Please sign in to comment.