I tried the sample code by Saullo Castro to get the parameters of a gamma distribution, using scipy.
import scipy
import scipy.stats
size = 30000
x = scipy.arange(size)
y = scipy.int_(scipy.round_(scipy.stats.vonmises.rvs(5,size=size)*47))
dist = getattr(scipy.stats, 'gamma')
param = dist.fit(y)
dist.entropy(param)
gives me the entropy result, which does not make sense. Where am I wrong here?
array([ 5.54183717, nan, -0.56062118])
In scipy documentation, it states that
entropy(a, loc=0, scale=1) (Differential) entropy of the RV.
where
a is the array of parameters of the gamma distribution