pub fn entropy_from_probabilities(p: &[f64]) -> f64
The Shannon entropy in bits of a probability distribution. Probabilities should sum to 1; zero entries contribute nothing. Returns NaN if any entry is negative or non-finite.
NaN