#!/usr/bin/env python3 import numpy as np from scipy import integrate from scipy.stats import norm import matplotlib.pyplot as plt def ddp(x): mean = 0, sigma = 1 return norm.pdf(x,mean,sigma) def quant(centroids, X): bornes = (centroids[:-1]+centroids[1:])/2 bornes = np.insert(bornes,0,-np.inf) bornes = np.append(bornes,np.inf) xquant =np.zeros(len(X)) for k in range(len(X)): for i in range(len(bornes)): if X[k]>=bornes[i] and X[k]