def apply_to(self, x, columns=False):
if isinstance(x, np.ndarray) and len(x.shape) == <NUM_LIT:2> and x.shape[<NUM_LIT:0>] == <NUM_LIT:3> and columns:<EOL><INDENT>return x + self.t.reshape((<NUM_LIT:3>,<NUM_LIT:1>))<EOL><DEDENT>if isinstance(x, np.ndarray) and (x.shape == (<NUM_LIT:3>, ) or (len(x.shape) == <NUM_LIT:2> and x.shape[<NUM_LIT:1>] == <NUM_LIT:3>)) and not columns:<EOL><INDENT>return x + self.t<EOL><DEDENT>elif isinstance(x, Complete):<EOL><INDENT>return Complete(x.r, x.t + self.t)<EOL><DEDENT>elif isinstance(x, Translation):<EOL><INDENT>return Translation(x.t + self.t)<EOL><DEDENT>elif isinstance(x, Rotation):<EOL><INDENT>return Complete(x.r, self.t)<EOL><DEDENT>elif isinstance(x, UnitCell):<EOL><INDENT>return x<EOL><DEDENT>else:<EOL><INDENT>raise ValueError("<STR_LIT>" % x)<EOL><DEDENT>
Apply this translation to the given object

           The argument can be several sorts of objects:

           * ``np.array`` with shape (3, )
           * ``np.array`` with shape (N, 3)
           * ``np.array`` with shape (3, N), use ``columns=True``
           * ``Translation``
           * ``Rotation``
           * ``Complete``
           * ``UnitCell``

           In case of arrays, the 3D vectors are translated. In case of trans-
           formations, a new transformation is returned that consists of this
           translation applied AFTER the given translation. In case of a unit
           cell, the original object is returned.

           This method is equivalent to ``self*x``.