'Compute the entropy of distribution array `D`.
`D` must be a distribution (i.e. sum to 1.0 over `axis`)
Parameters
D : array
Distribution.
axis : optional int
Axis of `D` along which to compute the entropy.'

@classmethod
def _entropy_normalized(cls, D, axis=None):

    D = np.asarray(D)
    Dc = np.clip(D, np.finfo(D.dtype).eps, 1.0)
    return (- np.sum((D * np.log2(Dc)), axis=axis))
