From 7d8402bd4124151ab10b839a04e2b568a026153f Mon Sep 17 00:00:00 2001 From: Dax Pryce Date: Wed, 23 Oct 2024 19:55:31 +0000 Subject: [PATCH] Unit tests failed, .all() is apparently what you need to do on numpy arrays,not all() the python function --- python/tests/test_files.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/tests/test_files.py b/python/tests/test_files.py index 97bb0baed..fbea46f25 100644 --- a/python/tests/test_files.py +++ b/python/tests/test_files.py @@ -15,7 +15,7 @@ def test_in_mem(self): expected = random_vectors(10_000, 100, dtype=np.float32) with vectors_as_temp_file(expected) as vecs_file: actual = dap.vectors_from_file(vecs_file, dtype=np.float32) - self.assertTrue(all(expected == actual)) + self.assertTrue((expected == actual).all()) def test_memmap(self): expected = random_vectors(10_000, 100, dtype=np.float32) @@ -32,7 +32,7 @@ def test_memmap(self): use_memap=True, mode="r+" ) - self.assertTrue(all(expected == actual)) + self.assertTrue((expected == actual).all()) if __name__ == '__main__':