def testModf(self): print 'Modf testing' a = np.modf(2.5) self.assertAlmostEqual(0.5, a[0], 5) self.assertAlmostEqual(2.0, a[1], 5) a = np.modf(-.4) self.assertAlmostEqual(-0.4, a[0], 5) self.assertAlmostEqual(0.0, a[1], 5)