docs: def sigmoidal_difference_membership(bin_center, bin_width, smoothness):
      r"""Create the difference of two sigmoids as membership function for a fuzzy histogram bin.
      
      Parameters
      ----------
      bin_center : number
          The center of the bin of which to compute the membership function.
      bin_width : number
          The width of a single bin (all expected to be of equal width).
      smoothness : number, optional
          The smoothness of the function; determines the neighbourhood affected.
          See below and `fuzzy_histogram` for a more detailed explanation
          
      Returns
      -------
      sigmoidal_difference_membership : function
          A sigmoidal difference membership function centered on the bin.
      
      Notes
      -----
      Since the sigmoidal membership function is infinite, it is
      not actually true that it does not contribute to bins outside of the neighbourhood
      range. But the contribution is so marginal (eps <= 0.001 per value) that it can be
      safely ignored.
      
      The sigmoidal membership function is defined as
      
      .. math::
          
          \mu_{sigmoid}(x) = \left[1+e^{-\alpha_1 (x-\zeta_1)}\right]^{-1} - \left[1+e^{-\alpha_2 (x-\zeta_2)}\right]^{-1}
  
      where :math:`\alpha_1 = \alpha_2 = \alpha` is computed throught the smoothness term
      and :math:`\zeta_1` and :math:`\zeta_2` constitute the left resp. right borders of the bin.
      
      The following figure shows three sigmoidal membership functions for bins at the
      centers -2, -0 and 2 with a bin width of 2 and a smoothness of 2:
      
      .. .. image:: images/sigmoid_01.png
      
      "Sigmoidal functions (1)"
      
      The central (green) membership functions extends to its up till the second bin
      (centered around -4) and the same to the right (until the bin centered around +4).
      Therefore all values from -5 to +5 are considered for membership in this bin. Values
      out of this range would only contribute marginally to this bin.
      Furthermore it is inteligable that the sum of all membership functions at each point
      is equal to 1, therefore all values are equally represented (i.e. contribute with 1
      to the overall histogram).
      
      The influence of the smoothness term can be observed in the following figure:
      
      .. .. image:: images/sigmoid_02.png
      
      "Sigmoidal functions (2)"
      
      Here smoothness has been chosen to be 1. The green function therefore extends just
      into the directly adjunct bins to its left and right.
      
      """
      if smoothness > 10 or smoothness < 1./10: raise AttributeError('the sigmoidal membership function supports only smoothnesses between 1/10 and 10.')
      
      # compute the alpha that will give a contribution to the next bins right and left
      alpha_nbh1 = 8. / bin_width # experimental value
      # compute the alpha that results in the desired smoothness level 
      alpha = alpha_nbh1 / smoothness
      
      def fun(x):
          sigmoid1 = 1 + math.exp(-1. * alpha * (x - (bin_center - 0.5 * bin_width)))
          sigmoid2 = 1 + math.exp(-1. * alpha * (x - (bin_center + 0.5 * bin_width)))
          return math.pow(sigmoid1, -1) - math.pow(sigmoid2, -1)
      return fun