Why can't statistics.mode
find the mode for a normally distributed (therefore, unimodal) random variable, but works fine for vectors containing integers?
import numpy as np
from numpy.random import rand,randn
import statistics as st
y = randn(20)
print(st.mode(y))
Aucun commentaire:
Enregistrer un commentaire