From 883274136941cb6a8e149b96874d650df0dc7976 Mon Sep 17 00:00:00 2001 From: Michele Peresano Date: Tue, 12 Dec 2023 15:10:23 +0100 Subject: [PATCH] Update test_energy_dispersion_to_migration Fix test_energy_dispersion_to_migration --- pyirf/irf/tests/test_energy_dispersion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyirf/irf/tests/test_energy_dispersion.py b/pyirf/irf/tests/test_energy_dispersion.py index ec0e444fb..451511ffc 100644 --- a/pyirf/irf/tests/test_energy_dispersion.py +++ b/pyirf/irf/tests/test_energy_dispersion.py @@ -143,7 +143,7 @@ def test_energy_dispersion_to_migration(): assert migration_matrix.shape[2] == dispersion_matrix.shape[2] # test that all migrations are included for central energies - np.allclose(migration_matrix.sum(axis=1).max(), 1, rtol=0.1) + assert np.isclose(migration_matrix.sum(axis=1).max(), 1, rtol=0.01) # test that migrations dont always sum to 1 (since some energies are # not included in the matrix)