Skip to content

Commit

Permalink
TST: relax assertion to avoid floating point issues (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinfleis authored Sep 19, 2024
1 parent c49f7d2 commit f77706b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pointpats/tests/test_spacetime.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def test_explore(self):
m = KnoxLocal.from_dataframe(
gdf, time_col="T", delta=20, tau=5, keep=True
).explore()
numpy.testing.assert_array_equal(
numpy.testing.assert_array_almost_equal(
m.get_bounds(),
[
[-0.0005034046601185694, 28.514258651567],
Expand All @@ -344,15 +344,15 @@ def test_hotspots_without_neighbors(self):
gdf = gdf.set_crs(21096)
numpy.random.seed(1)
knox = KnoxLocal.from_dataframe(
gdf, time_col="T", delta=20, tau=5,
gdf, time_col="T", delta=20, tau=5,
).hotspots(keep_neighbors=False, inference='analytic')
assert knox.shape == (3,7)

def test_hotspots_with_neighbors(self):
gdf = self.gdf.copy()
gdf = gdf.set_crs(21096)
knox = KnoxLocal.from_dataframe(
gdf, time_col="T", delta=20, tau=5,
gdf, time_col="T", delta=20, tau=5,
).hotspots(keep_neighbors=True, inference='analytic')
assert knox.shape == (4,7)

Expand Down

0 comments on commit f77706b

Please sign in to comment.