def test_intdif_random(self) : for dt in [float, complex] : shp = (9, 10, 11) c = np.random.randint(low=-10, high=10, size=shp) p = MVPolyCube(c, dtype=dt) expected = p.coef obtained = p.int(1, 1, 2).diff(1, 1, 2).coef self.assertTrue((np.abs(expected - obtained) < 1e-10).all(), "bad integrate-differentiate \n{0!s}\n{1!s}".format(repr(obtained), repr(expected)))