docs: def relative_deviation(h1, h2): # 18 us @array, 42 us @list \w 100 bins
      r"""
      Calculate the deviation between two histograms.
      
      The relative deviation between two histograms :math:`H` and :math:`H'` of size :math:`m` is
      defined as:
      
      .. math::
      
          d_{rd}(H, H') =
              \frac{
                  \sqrt{\sum_{m=1}^M(H_m - H'_m)^2}
                }{
                  \frac{1}{2}
                  \left(
                      \sqrt{\sum_{m=1}^M H_m^2} +
                      \sqrt{\sum_{m=1}^M {H'}_m^2}
                  \right)
                }
      
      *Attributes:*
  
      - semimetric (triangle equation satisfied?)
      
      *Attributes for normalized histograms:*
  
      - :math:`d(H, H')\in[0, \sqrt{2}]`
      - :math:`d(H, H) = 0`
      - :math:`d(H, H') = d(H', H)`
      
      *Attributes for not-normalized histograms:*
  
      - :math:`d(H, H')\in[0, 2]`
      - :math:`d(H, H) = 0`
      - :math:`d(H, H') = d(H', H)`
      
      *Attributes for not-equal histograms:*
  
      - not applicable    
      
      Parameters
      ----------
      h1 : sequence
          The first histogram.
      h2 : sequence
          The second histogram, same bins as ``h1``.
      
      Returns
      -------
      relative_deviation : float
          Relative deviation between the two histograms.
      """
      h1, h2 = __prepare_histogram(h1, h2)
      numerator = math.sqrt(scipy.sum(scipy.square(h1 - h2)))
      denominator = (math.sqrt(scipy.sum(scipy.square(h1))) + math.sqrt(scipy.sum(scipy.square(h2)))) / 2.
      return numerator / denominator