Skip to content

Commit

Permalink
means
Browse files Browse the repository at this point in the history
  • Loading branch information
rhayes777 committed Nov 1, 2024
1 parent e5717a9 commit c2e1c5a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions autoarray/structures/triangles/coordinate_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,3 +243,7 @@ def for_limits_and_scale(
x_offset=x_mean,
y_offset=y_mean,
)

@property
def means(self):
return np.mean(self.triangles, axis=1)
Original file line number Diff line number Diff line change
Expand Up @@ -297,3 +297,7 @@ def test_for_limits_and_scale():
],
]
)


def test_means(one_triangle):
assert np.all(one_triangle.means == [[0.0, -0.14433756729740643]])

0 comments on commit c2e1c5a

Please sign in to comment.