bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / stats / _distn_infrastructure / rv_discrete / entropy
function
scipy.stats._distn_infrastructure:rv_discrete.entropy
source: build-install/usr/lib/python3.14/site-packages/scipy/stats/_distn_infrastructure.py:3960
Signature
def entropy(self, *args, **kwargs)Summary
Differential entropy of the RV.
Parameters
arg1, arg2, arg3,...: array_likeThe shape parameter(s) for the distribution (see docstring of the instance object for more information).
loc: array_like, optionalLocation parameter (default=0).
Notes
Entropy is defined base e:
>>> import numpy as np >>> from scipy.stats._distn_infrastructure import rv_discrete >>> drv = rv_discrete(values=((0, 1), (0.5, 0.5))) >>> np.allclose(drv.entropy(), np.log(2.0)) True
Aliases
scipy.stats.rv_discrete.entropy