From b771af720254ad517c3a511f8deb60a80d475e4b Mon Sep 17 00:00:00 2001 From: ilan-gold Date: Tue, 15 Oct 2024 12:30:41 +0200 Subject: [PATCH] (fix): use `item` --- tests/test_muon_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_muon_tools.py b/tests/test_muon_tools.py index a38fa2d..089f5d6 100644 --- a/tests/test_muon_tools.py +++ b/tests/test_muon_tools.py @@ -144,7 +144,7 @@ def test_multi_group(self, filepath_hdf5): for sample, value in (("sample9_groupA", 1.719391), ("sample17_groupB", -2.057848)): si = np.where(mdata.obs.index == sample)[0] - assert mdata.obsm["X_mofa"][si, 0] == pytest.approx(value, 1e-4) + assert mdata.obsm["X_mofa"][si, 0].item() == pytest.approx(value) if __name__ == "__main__":