1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
Description: Fix: type numpy.ndarray doesn't define __round__ method
Author: Andreas Tille <tille@debian.org>
Last-Update: Thu, 13 Jul 2023 13:24:41 +0200
--- a/unifrac/tests/test_api.py
+++ b/unifrac/tests/test_api.py
@@ -714,7 +714,7 @@ class FaithPDEdgeCasesTests(unittest.Tes
actual = self.faith_pd_work([0, 0, 0, 0, 0], self.oids1, ['foo'],
self.t1)
expected = 0.0
- self.assertAlmostEqual(actual.values, expected)
+ np.testing.assert_array_almost_equal(actual.values, expected, decimal=4)
def test_faith_pd_biom_table_empty(self):
table, tree = self.write_table_tree([], [], [],
|