scipy.stats attribute `entropy` for continuous distributions doesn't work manually
问题 Each continuous distribution in scipy.stats comes with an attribute that calculates its differential entropy: .entropy . Unlike the normal distribution ( norm ) and others that have a closed-form solution for entropy, other distributions have to rely on numerical integration. Trying to find out which function the .entropy attribute is calling in those cases, I found a function called _entropy in scipy.stats._distn_infrastructure.py that does so with integrate.quad(pdf) (numerical integration)