docs: def hmtk_histogram_1D(values, intervals, offset=1.0E-10):
      """
      So, here's the problem. We tend to refer to certain data (like magnitudes)
      rounded to the nearest 0.1 (or similar, i.e. 4.1, 5.7, 8.3 etc.). We also
      like our tables to fall on on the same interval, i.e. 3.1, 3.2, 3.3 etc.
      We usually assume that the counter should correspond to the low edge,
      i.e. 3.1 is in the group 3.1 to 3.2 (i.e. L <= M < U).
      Floating point precision can be a bitch! Because when we read in magnitudes
      from files 3.1 might be represented as 3.0999999999 or as 3.1000000000001
      and this is seemingly random. Similarly, if np.arange() is used to generate
      the bin intervals then we see similar floating point problems emerging. As
      we are frequently encountering density plots with empty rows or columns
      where data should be but isn't because it has been assigned to the wrong
      group.
  
      Instead of using numpy's own historgram function we use a slower numpy
      version that allows us to offset the intervals by a smaller amount and
      ensure that 3.0999999999, 3.0, and 3.10000000001 would fall in the group
      3.1 - 3.2!
  
      :param numpy.ndarray values:
          Values of data
      :param numpy.ndarray intervals:
          Data bins
      :param float offset:
          Small amount to offset the bins for floating point precision
      :returns:
          Count in each bin (as float)
      """
      nbins = len(intervals) - 1
      counter = np.zeros(nbins, dtype=float)
      x_ints = intervals - offset
      for i in range(nbins):
          idx = np.logical_and(values >= x_ints[i], values < x_ints[i + 1])
          counter[i] += float(np.sum(idx))
      return counter