diff --git a/floris/tools/floris_interface.py b/floris/tools/floris_interface.py index 437e27e14..4a98549db 100644 --- a/floris/tools/floris_interface.py +++ b/floris/tools/floris_interface.py @@ -1027,7 +1027,7 @@ def get_turbine_layout(self, z=False): np.array: lists of x, y, and (optionally) z coordinates of each turbine """ - xcoords, ycoords, zcoords = np.array([c.elements for c in self.floris.farm.coordinates]).T + xcoords, ycoords, zcoords = np.array([c.components for c in self.floris.farm.coordinates]).T if z: return xcoords, ycoords, zcoords else: diff --git a/floris/utilities.py b/floris/utilities.py index 6e565d225..f5854a603 100644 --- a/floris/utilities.py +++ b/floris/utilities.py @@ -38,11 +38,8 @@ class Vec3: Args: components (list(numeric, numeric, numeric), numeric): All three vector components. - string_format (str, optional): Format to use in the - overloaded __str__ function. Defaults to None. """ components: NDArrayFloat = field(converter=floris_array_converter) - # NOTE: this does not convert elements to float if they are given as int. Is this ok? @components.validator def _check_components(self, attribute, value) -> None: @@ -117,12 +114,6 @@ def x3(self): def x3(self, value): self.components[2] = float(value) - @property - def elements(self) -> Tuple[float, float, float]: - # TODO: replace references to elements with components - # and remove this @property - return self.components - def cosd(angle): """ diff --git a/tests/vec3_unit_test.py b/tests/vec3_unit_test.py index dc1ac091c..f8b624dd8 100644 --- a/tests/vec3_unit_test.py +++ b/tests/vec3_unit_test.py @@ -123,10 +123,10 @@ def test_equality(vec3_fixture): assert vec3_fixture != rhs -def test_elements_property(vec3_fixture): - """Ensure that the x1, x2, and x3 elements match the expected values. +def test_components_property(vec3_fixture): + """Ensure that the x1, x2, and x3 components match the expected values. """ - x1, x2, x3 = vec3_fixture.elements + x1, x2, x3 = vec3_fixture.components assert 4.0 == x1 assert 4.0 == x2 assert 0.0 == x3