diff --git a/floris/floris_model.py b/floris/floris_model.py index 3745eeb19..78f60ae5f 100644 --- a/floris/floris_model.py +++ b/floris/floris_model.py @@ -843,11 +843,7 @@ def get_farm_AVP( "operation." ) - if ( - values is None - and not isinstance(self.wind_data, WindRose) - and not isinstance(self.wind_data, WindTIRose) - ): + if values is None and self.wind_data is None: self.logger.warning( "Computing AVP with uniform value equal to 1. Results will be equivalent to " "annual energy production." diff --git a/floris/wind_data.py b/floris/wind_data.py index 6ac81f7aa..2579fd3e0 100644 --- a/floris/wind_data.py +++ b/floris/wind_data.py @@ -592,7 +592,7 @@ def assign_value_piecewise_linear( """ def piecewise_linear_value_func(wind_directions, wind_speeds): - value = np.zeros_like(wind_speeds) + value = np.zeros_like(wind_speeds, dtype=float) value[wind_speeds < ws_knee] = ( slope_1 * wind_speeds[wind_speeds < ws_knee] + value_zero_ws ) @@ -1146,7 +1146,7 @@ def assign_value_piecewise_linear( """ def piecewise_linear_value_func(wind_directions, wind_speeds, turbulence_intensities): - value = np.zeros_like(wind_speeds) + value = np.zeros_like(wind_speeds, dtype=float) value[wind_speeds < ws_knee] = ( slope_1 * wind_speeds[wind_speeds < ws_knee] + value_zero_ws ) @@ -1550,7 +1550,7 @@ def assign_value_piecewise_linear( """ def piecewise_linear_value_func(wind_directions, wind_speeds): - value = np.zeros_like(wind_speeds) + value = np.zeros_like(wind_speeds, dtype=float) value[wind_speeds < ws_knee] = ( slope_1 * wind_speeds[wind_speeds < ws_knee] + value_zero_ws )