diff --git a/windpowerlib/power_output.py b/windpowerlib/power_output.py index 684009f..8b1425e 100644 --- a/windpowerlib/power_output.py +++ b/windpowerlib/power_output.py @@ -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 @@ -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