Skip to content

Commit

Permalink
Add missing attribute declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf committed Dec 1, 2023
1 parent be5ecf6 commit 6d24131
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions floris/simulation/farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ class Farm(BaseClass):

turbine_definitions: list = field(init=False, validator=iter_validator(list, dict))
coordinates: List[Vec3] = field(init=False)
turbine_fCts: tuple = field(init=False, default=[])

turbine_fCts: Dict[str, interp1d] | List[interp1d] = field(init=False, default=[])
turbine_fCts_sorted: NDArrayFloat = field(init=False, default=[])

turbine_fTilts: list = field(init=False, default=[])

yaw_angles: NDArrayFloat = field(init=False)
Expand All @@ -99,6 +102,7 @@ class Farm(BaseClass):
turbine_type_map_sorted: NDArrayObject = field(init=False, default=[])

turbine_power_interps: Dict[str, interp1d] | List[interp1d] = field(init=False, default=[])
turbine_power_interps_sorted: NDArrayFloat = field(init=False, default=[])

rotor_diameters: NDArrayFloat = field(init=False, default=[])
rotor_diameters_sorted: NDArrayFloat = field(init=False, default=[])
Expand Down Expand Up @@ -468,7 +472,6 @@ def finalize(self, unsorted_indices):
unsorted_indices[:,:,:,0,0],
axis=2
)
# TODO: do these need to be unsorted? Maybe we should just for completeness...
self.ref_density_cp_cts = np.take_along_axis(
self.ref_density_cp_cts_sorted,
unsorted_indices[:,:,:,0,0],
Expand Down

0 comments on commit 6d24131

Please sign in to comment.