Skip to content

Commit

Permalink
Update resolution for floats in tests (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoxbro authored Aug 18, 2024
1 parent 81c841a commit af931c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spatialpandas/tests/geometry/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
suppress_health_check=[HealthCheck.too_slow],
)

resolution = abs(int(np.abs(np.log10(np.finfo(1.0).resolution))))

coord = st.floats(
allow_infinity=False, allow_nan=False, max_value=1000, min_value=-1000,
).map(lambda x: round(x, 15))
).map(lambda x: round(x, resolution - 1))

st_points = arrays(
elements=st.floats(
Expand Down

0 comments on commit af931c9

Please sign in to comment.