User guide
Reference
full name: tenpy.tools.math.entropy
parent module: tenpy.tools.math
tenpy.tools.math
type: function
Calculate the entropy of a distribution.
Assumes that p is a normalized distribution (np.sum(p)==1.).
np.sum(p)==1.
p (1D array) – A normalized distribution.
n (1 | float | np.inf) – Selects the entropy, see below.
entropy – Shannon-entropy \(-\sum_i p_i \log(p_i)\) (n=1) or Renyi-entropy \(\frac{1}{1-n} \log(\sum_i p_i^n)\) (n != 1) of the distribution p.
float