Python Scipy

Statistics

stats

Empirical distribution

hist = np.histogram(data, bins=100)
hist_dist = scipy.stats.rv_histogram(hist)