parameters: (self, *names)
return_statement: return super(Tensor, self).align_to(
              [name for name in names if not is_ellipsis(name)],
              ellipsis_idx)
docstring: r"""Permutes the dimensions of the :attr:`self` tensor to match the order
          specified in :attr:`names`, adding size-one dims for any new names.
  
          All of the dims of :attr:`self` must be named in order to use this method.
          The resulting tensor is a view on the original tensor.
  
          All dimension names of :attr:`self` must be present in :attr:`names`.
          :attr:`names` may contain additional names that are not in ``self.names``;
          the output tensor has a size-one dimension for each of those new names.
  
          :attr:`names` may contain up to one Ellipsis (``...``).
          The Ellipsis is expanded to be equal to all dimension names of :attr:`self`
          that are not mentioned in :attr:`names`, in the order that they appear
          in :attr:`self`.
  
          Python 2 does not support Ellipsis but one may use a string literal
          instead (``'...'``).
  
          Args:
              names (iterable of str): The desired dimension ordering of the
                  output tensor. May contain up to one Ellipsis that is expanded
                  to all unmentioned dim names of :attr:`self`.
  
          Examples::
  
              >>> tensor = torch.randn(2, 2, 2, 2, 2, 2)
              >>> named_tensor = tensor.refine_names('A', 'B', 'C', 'D', 'E', 'F')
  
              # Move the F and E dims to the front while keeping the rest in order
              >>> named_tensor.align_to('F', 'E', ...)
  
          .. warning::
              The named tensor API is experimental and subject to change.
docstring_summary: r"""Permutes the dimensions of the :attr:`self` tensor to match the order
          specified in :attr:`names`, adding size-one dims for any new names.
docstring_tokens: r Permutes the dimensions of the : attr : self tensor to match the order specified in : attr : names adding size - one dims for any new names .
function: def align_to(self, *names):
          r"""Permutes the dimensions of the :attr:`self` tensor to match the order
          specified in :attr:`names`, adding size-one dims for any new names.
  
          All of the dims of :attr:`self` must be named in order to use this method.
          The resulting tensor is a view on the original tensor.
  
          All dimension names of :attr:`self` must be present in :attr:`names`.
          :attr:`names` may contain additional names that are not in ``self.names``;
          the output tensor has a size-one dimension for each of those new names.
  
          :attr:`names` may contain up to one Ellipsis (``...``).
          The Ellipsis is expanded to be equal to all dimension names of :attr:`self`
          that are not mentioned in :attr:`names`, in the order that they appear
          in :attr:`self`.
  
          Python 2 does not support Ellipsis but one may use a string literal
          instead (``'...'``).
  
          Args:
              names (iterable of str): The desired dimension ordering of the
                  output tensor. May contain up to one Ellipsis that is expanded
                  to all unmentioned dim names of :attr:`self`.
  
          Examples::
  
              >>> tensor = torch.randn(2, 2, 2, 2, 2, 2)
              >>> named_tensor = tensor.refine_names('A', 'B', 'C', 'D', 'E', 'F')
  
              # Move the F and E dims to the front while keeping the rest in order
              >>> named_tensor.align_to('F', 'E', ...)
  
          .. warning::
              The named tensor API is experimental and subject to change.
  
          """
          if has_torch_function_unary(self):
              return handle_torch_function(Tensor.align_to, (self,), self, *names)
          ellipsis_idx = single_ellipsis_index(names, 'align_to')
          if ellipsis_idx is None:
              return super(Tensor, self).align_to(names)
          return super(Tensor, self).align_to(
              [name for name in names if not is_ellipsis(name)],
              ellipsis_idx)
function_tokens: def align_to ( self , * names ) : if has_torch_function_unary ( self ) : return handle_torch_function ( Tensor . align_to , ( self , ) , self , * names ) ellipsis_idx = single_ellipsis_index ( names , 'align_to' ) if ellipsis_idx is None : return super ( Tensor , self ) . align_to ( names ) return super ( Tensor , self ) . align_to ( [ name for name in names if not is_ellipsis ( name ) ] , ellipsis_idx )