def rtrans(self, tform, coords): """apply random translation to both coords and transformation object""" xyz = _utils.random_translation() self.policy.translate(coords, xyz) tform.translate(xyz)
def test_apply_translation(self): rot = _utils.random_translation() _utils.translate(self.x2, rot) self.tform.apply_translation(self.x, rot) self.assertLess(np.abs(self.x - self.x2).max(), 1e-3)