Skip to content

Commit

Permalink
Remove time tests that randomly fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rhugonnet committed Apr 19, 2023
1 parent 54fbf70 commit 9d4461a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_spatialstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -947,21 +947,21 @@ def test_neff_exact_and_approx_hugonnet(self) -> None:
)

# Check that the function runs with default parameters
t0 = time.time()
# t0 = time.time()
neff_exact = xdem.spatialstats.neff_exact(
coords=coords, errors=errors, params_variogram_model=params_variogram_model
)
t1 = time.time()
# t1 = time.time()

# Check that the non-vectorized version gives the same result
neff_exact_nv = xdem.spatialstats.neff_exact(
coords=coords, errors=errors, params_variogram_model=params_variogram_model, vectorized=False
)
t2 = time.time()
# t2 = time.time()
assert neff_exact == pytest.approx(neff_exact_nv, rel=0.001)

# Check that the vectorized version is faster (vectorized for about 250 points here)
assert (t1 - t0) < (t2 - t1)
# assert (t1 - t0) < (t2 - t1)

# Check that the approximation function runs with default parameters, sampling 100 out of 250 samples
# t3 = time.time()
Expand Down

0 comments on commit 9d4461a

Please sign in to comment.