parameters: (array)
return_statement: return array[np.sort(unique_idx)]
docstring: Return unique rows in a 2D array.
  
      Examples
      --------
      >>> from pygimli.utils import unique_rows
      >>> import numpy as np
      >>> A = np.array(([1,2,3],[3,2,1],[1,2,3]))
      >>> unique_rows(A)
      array([[1, 2, 3],
             [3, 2, 1]])
docstring_summary: Return unique rows in a 2D array.
docstring_tokens: Return unique rows in a 2D array .
function: def unique_rows(array):
      """Return unique rows in a 2D array.
  
      Examples
      --------
      >>> from pygimli.utils import unique_rows
      >>> import numpy as np
      >>> A = np.array(([1,2,3],[3,2,1],[1,2,3]))
      >>> unique_rows(A)
      array([[1, 2, 3],
             [3, 2, 1]])
      """
      b = array.ravel().view(
          np.dtype((np.void, array.dtype.itemsize * array.shape[1])))
      _, unique_idx = np.unique(b, return_index=True)
  
      return array[np.sort(unique_idx)]
function_tokens: def unique_rows ( array ) : b = array . ravel ( ) . view ( np . dtype ( ( np . void , array . dtype . itemsize * array . shape [ 1 ] ) ) ) _ , unique_idx = np . unique ( b , return_index = True ) return array [ np . sort ( unique_idx ) ]