def test_equality(self): st = SingleTransform() for i in range(5): print "------next-------" p = numpy.random.rand(6, 1) new = st.inflate(p, True) old = st.inflate_old(p) print new print old print "diff: " print old - new self.assertAlmostEqual(numpy.linalg.norm(old - new), 0.0, 6)
def test_inflate_old_vs_new_4(self): p = [0, 0, 1, numpy.pi / 5, 0, 0] st = SingleTransform(p) self.assertAlmostEqual( numpy.linalg.norm(st.transform - st.inflate_old(p)), 0.0, 4)
def test_inflate_old_vs_new_4(self): p=[0,0,1,numpy.pi/5,0,0] st=SingleTransform(p) self.assertAlmostEqual(numpy.linalg.norm(st.transform-st.inflate_old(p)), 0.0,4)