Skip to content

Commit f77706b

Browse files
authored
TST: relax assertion to avoid floating point issues (#148)
1 parent c49f7d2 commit f77706b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pointpats/tests/test_spacetime.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def test_explore(self):
328328
m = KnoxLocal.from_dataframe(
329329
gdf, time_col="T", delta=20, tau=5, keep=True
330330
).explore()
331-
numpy.testing.assert_array_equal(
331+
numpy.testing.assert_array_almost_equal(
332332
m.get_bounds(),
333333
[
334334
[-0.0005034046601185694, 28.514258651567],
@@ -344,15 +344,15 @@ def test_hotspots_without_neighbors(self):
344344
gdf = gdf.set_crs(21096)
345345
numpy.random.seed(1)
346346
knox = KnoxLocal.from_dataframe(
347-
gdf, time_col="T", delta=20, tau=5,
347+
gdf, time_col="T", delta=20, tau=5,
348348
).hotspots(keep_neighbors=False, inference='analytic')
349349
assert knox.shape == (3,7)
350350

351351
def test_hotspots_with_neighbors(self):
352352
gdf = self.gdf.copy()
353353
gdf = gdf.set_crs(21096)
354354
knox = KnoxLocal.from_dataframe(
355-
gdf, time_col="T", delta=20, tau=5,
355+
gdf, time_col="T", delta=20, tau=5,
356356
).hotspots(keep_neighbors=True, inference='analytic')
357357
assert knox.shape == (4,7)
358358

0 commit comments

Comments
 (0)