« Python pour le calcul scientifique/Interpolation, extrapolation et lissage » : différence entre les versions

Contenu supprimé Contenu ajouté
m →‎Le module scipy.interpolate : -code copié par erreur
Ligne 194 :
 
print("CubicSpline == interp1d cubic == BarycentricInterpolator == KroghInterpolator == splrep PPoly")
 
 
# In[61]:
 
 
fig = plt.figure(figsize=[20, 12])
 
x = np.linspace(-0.25*np.pi, 2.25*np.pi, 97)
y1 = finterpc(x)
y2 = finterpd.__call__(x)
y3 = finterpe.__call__(x)
y4 = finterph.__call__(x)
 
plt.plot(x, y1, label="interp1d cubic")
plt.plot(x, y2, label="BarycentricInterpolator")
plt.plot(x, y3, label="KroghInterpolator")
plt.plot(x, y4, label="splrep, PPoly")
plt.legend()
</source>
{{boîte déroulante fin}}