parameters: (self, col, reverse=False)
docstring: Sort SolutionArray by column *col*.
  
          :param col: Column that is used to sort the SolutionArray.
          :param reverse: If True, the sorted list is reversed (descending order).
docstring_summary: Sort SolutionArray by column *col*.
docstring_tokens: Sort SolutionArray by column * col * .
function: def sort(self, col, reverse=False):
          """
          Sort SolutionArray by column *col*.
  
          :param col: Column that is used to sort the SolutionArray.
          :param reverse: If True, the sorted list is reversed (descending order).
          """
          if len(self._shape) != 1:
              raise TypeError("sort only works for 1D SolutionArray objects")
  
          indices = np.argsort(getattr(self, col))
          if reverse:
              indices = indices[::-1]
          self._states = [self._states[ix] for ix in indices]
          for k, v in self._extra.items():
              self._extra[k] = v[indices]
function_tokens: def sort ( self , col , reverse = False ) : if len ( self . _shape ) != 1 : raise TypeError ( "sort only works for 1D SolutionArray objects" ) indices = np . argsort ( getattr ( self , col ) ) if reverse : indices = indices [ : : - 1 ] self . _states = [ self . _states [ ix ] for ix in indices ] for k , v in self . _extra . items ( ) : self . _extra [ k ] = v [ indices ]