Skip to content

Commit

Permalink
Unit tests failed, .all() is apparently what you need to do on numpy …
Browse files Browse the repository at this point in the history
…arrays,not all() the python function
  • Loading branch information
daxpryce committed Oct 23, 2024
1 parent 708dbf1 commit 7d8402b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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__':
Expand Down

0 comments on commit 7d8402b

Please sign in to comment.