Exemplo n.º 1
0
 def _test(self, expected, a0, a1, u0, u1, sigma, relative):
     """Symmetric test on the data by switching the order of arguments."""
     assert_array_equal(expected,
                        getOverlaps(a0, a1, u0, u1, sigma, relative),
                        err_msg=self._errMsg.format(a0, u0, a1, u1, sigma))
     assert_array_equal(expected,
                        getOverlaps(a1, a0, u1, u0, sigma, relative),
                        err_msg=self._errMsg.format(sigma, a1, u1, a0, u0))
Exemplo n.º 2
0
 def test_overlap_badshapes(self):
     """Verify IndexError is raised for bad shapes."""
     vec = arange(4)
     mat = vec.reshape(2, 2)
     with self.assertRaises(IndexError):
         getOverlaps(vec, mat, vec, mat, 1)