def entropy(self) -> float:
    'Calculate entropy of the distribution.'
    return (- np.sum((self.p * np.log(self.p))))
Calculate entropy of the distribution.
def entropy(self) -> float:
    
    return (- np.sum((self.p * np.log(self.p))))