Skip to content

Commit 4ed1a13

Browse files
committed
fix uniqueness
1 parent b831b90 commit 4ed1a13

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

autoarray/structures/triangles/jax_coordinate_array.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def neighborhood(self) -> "CoordinateArrayTriangles":
130130
new_coordinates,
131131
axis=0,
132132
size=4 * self.coordinates.shape[0],
133+
fill_value=np.nan,
133134
),
134135
side_length=self.side_length,
135136
flipped=self.flipped,

test_autoarray/structures/triangles/test_coordinate_jax.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,11 @@ def test_up_sample(one_triangle):
103103
]
104104
),
105105
)
106+
107+
108+
def test_means(one_triangle):
109+
assert len(one_triangle.means) == 1
110+
111+
up_sampled = one_triangle.up_sample()
112+
neighborhood = up_sampled.neighborhood()
113+
assert np.count_nonzero(~np.isnan(neighborhood.means)) == 20

0 commit comments

Comments
 (0)