code: def eval_entropy(x):
      
      hx = 0.
      sx = sorted(x)
      for i, j in zip(sx[:-1], sx[1:]):
          delta = j-i
          if bool(delta):
              hx += np.log(np.abs(delta))
      hx = hx / (len(x) - 1) + psi(len(x)) - psi(1)
  
      return hx
docs: Evaluate the entropy of the input variable.
  
      :param x: input variable 1D
      :return: entropy of x