Skip to content

Commit

Permalink
fix uniqueness
Browse files Browse the repository at this point in the history
  • Loading branch information
rhayes777 committed Nov 11, 2024
1 parent b831b90 commit 4ed1a13
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions autoarray/structures/triangles/jax_coordinate_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ def neighborhood(self) -> "CoordinateArrayTriangles":
new_coordinates,
axis=0,
size=4 * self.coordinates.shape[0],
fill_value=np.nan,
),
side_length=self.side_length,
flipped=self.flipped,
Expand Down
8 changes: 8 additions & 0 deletions test_autoarray/structures/triangles/test_coordinate_jax.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,11 @@ def test_up_sample(one_triangle):
]
),
)


def test_means(one_triangle):
assert len(one_triangle.means) == 1

up_sampled = one_triangle.up_sample()
neighborhood = up_sampled.neighborhood()
assert np.count_nonzero(~np.isnan(neighborhood.means)) == 20

0 comments on commit 4ed1a13

Please sign in to comment.