original_docstring: 
      Sorts a 2D array along the column axis up until `trunc` columns.
      Returns the truncated sorted values together with truncated sorted indices.
  
      This function is faster than standard sorting followed by truncation.
      
docstring: Sorts a 2D array along the column axis up until `trunc` columns.
  Returns the truncated sorted values together with truncated sorted indices.
  
  This function is faster than standard sorting followed by truncation.
docstring_tokens: Sorts a 2D array along the column axis up until ` trunc ` columns . Returns the truncated sorted values together with truncated sorted indices . This function is faster than standard sorting followed by truncation .
code: def _sort2d_trunc(m, trunc, reverse=False):
      """
      Sorts a 2D array along the column axis up until `trunc` columns.
      Returns the truncated sorted values together with truncated sorted indices.
  
      This function is faster than standard sorting followed by truncation.
      """
  
      parts = np.argpartition(-m, trunc, axis=1)
      parts = parts[:, :trunc]
      parts_inds = _args2d_to_indices(parts)
  
      ids = np.argsort(-m[parts_inds], axis=1)
      ids_inds = _args2d_to_indices(ids)
  
      scores = m[parts_inds][ids_inds]
      ids = parts[ids_inds]
  
      if reverse:
          ids = np.fliplr(ids)
          scores = np.fliplr(scores)
  
      return scores, ids
code_tokens: def _sort2d_trunc ( m , trunc , reverse = False ) : parts = np . argpartition ( - m , trunc , axis = 1 ) parts = parts [ : , : trunc ] parts_inds = _args2d_to_indices ( parts ) ids = np . argsort ( - m [ parts_inds ] , axis = 1 ) ids_inds = _args2d_to_indices ( ids ) scores = m [ parts_inds ] [ ids_inds ] ids = parts [ ids_inds ] if reverse : ids = np . fliplr ( ids ) scores = np . fliplr ( scores ) return scores , ids
short_docstring: Sorts a 2D array along the column axis up until `trunc` columns.
short_docstring_tokens: Sorts a 2D array along the column axis up until ` trunc ` columns .
comment: """
      Sorts a 2D array along the column axis up until `trunc` columns.
      Returns the truncated sorted values together with truncated sorted indices.
  
      This function is faster than standard sorting followed by truncation.
      """