code: def arglexsort(arrays):
      
      dtypes = ','.join(array.dtype.str for array in arrays)
      recarray = np.empty(len(arrays[0]), dtype=dtypes)
      for i, array in enumerate(arrays):
          recarray['f%s' % i] = array
      return recarray.argsort()
docs: Returns the indices of the lexicographical sorting
      order of the supplied arrays.