Skip to content

Commit

Permalink
fixtest: allow tiny differences in floating point
Browse files Browse the repository at this point in the history
  • Loading branch information
william-silversmith committed Jul 17, 2024
1 parent 5711b12 commit 7ed0aab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion automated_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,6 @@ def test_simplified_meshes_remain_the_same(connectomics_labels, order):
with gzip.open(f"./connectomics_npy_meshes/simplified/{lbl}.ply.gz", "rb") as f:
old_mesh = zmesh.Mesh.from_ply(f.read())
new_mesh = mesher.get_mesh(lbl, normals=False, simplification_factor=100, max_simplification_error=40)
assert np.all(np.sort(old_mesh.vertices[old_mesh.faces], axis=0) == np.sort(new_mesh.vertices[new_mesh.faces], axis=0))
assert np.all(np.isclose(np.sort(old_mesh.vertices[old_mesh.faces], axis=0), np.sort(new_mesh.vertices[new_mesh.faces], axis=0)))
print(lbl, "ok")

0 comments on commit 7ed0aab

Please sign in to comment.