docs: def _unique(x):
      """Faster version of np.unique().
  
      This version is restricted to 1D arrays of non-negative integers.
  
      It is only faster if len(x) >> len(unique(x)).
  
      """
      if x is None or len(x) == 0:
          return np.array([], dtype=np.int64)
      # WARNING: only keep positive values.
      # cluster=-1 means "unclustered".
      x = _as_array(x)
      x = x[x >= 0]
      bc = np.bincount(x)
      return np.nonzero(bc)[0]