docs: def quantile(y, k=4):
      """
      Calculates the quantiles for an array
  
      Parameters
      ----------
      y : array
          (n,1), values to classify
      k : int
          number of quantiles
  
      Returns
      -------
      q         : array
                  (n,1), quantile values
  
      Examples
      --------
      >>> import numpy as np
      >>> import mapclassify as mc
      >>> x = np.arange(1000)
      >>> mc.classifiers.quantile(x)
      array([249.75, 499.5 , 749.25, 999.  ])
      >>> mc.classifiers.quantile(x, k = 3)
      array([333., 666., 999.])
  
      Note that if there are enough ties that the quantile values repeat, we
      collapse to pseudo quantiles in which case the number of classes will be
      less than k
  
      >>> x = [1.0] * 100
      >>> x.extend([3.0] * 40)
      >>> len(x)
      140
      >>> y = np.array(x)
      >>> mc.classifiers.quantile(y)
      array([1., 3.])
      """
  
      w = 100. / k
      p = np.arange(w, 100 + w, w)
      if p[-1] > 100.0:
          p[-1] = 100.0
      q = np.array([stats.scoreatpercentile(y, pct) for pct in p])
      q = np.unique(q)
      k_q = len(q)
      if k_q < k:
          Warn('Warning: Not enough unique values in array to form k classes',
               UserWarning)
          Warn('Warning: setting k to %d' % k_q, UserWarning)
      return q