File: numpy.patch

package info (click to toggle)
unifrac 1.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 728 kB
  • sloc: python: 1,643; sh: 45; makefile: 8
file content (15 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (2)
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([], [], [],