code: def apply_to(self, x, columns=False):
          if isinstance(x, np.ndarray) and len(x.shape) == 2 and x.shape[0] == 3 and columns:
              return x + self.t.reshape((3,1))
          if isinstance(x, np.ndarray) and (x.shape == (3, ) or (len(x.shape) == 2 and x.shape[1] == 3)) and not columns:
              return x + self.t
          elif isinstance(x, Complete):
              return Complete(x.r, x.t + self.t)
          elif isinstance(x, Translation):
              return Translation(x.t + self.t)
          elif isinstance(x, Rotation):
              return Complete(x.r, self.t)
          elif isinstance(x, UnitCell):
              return x
          else:
              raise ValueError("Can not apply this translation to %s" % x)