H function

Compute the entropy of a discrete sample