Python,
Scipy - f2py - ...
O. Wilk
Scipy
Survol
Plus en détails
scipy.optimize
scipy.linalg
scipy.sparse
f2py
Fortran
C
Une application
Caisson acoustique
Maillage
Main.py
MaillageEtEF.py
Bords.py
Matrices.py
Spmat2csc.py
Dirichlet.py
Visu_0.py
Résultat
Scipy
Survol de :
scipy.integrate : Integration of functions (librairie
fortran QuadPack) and ordinary differential
equation solvers (librairie fortran OdePack) :
>>> import numpy as np
>>> import scipy.integrate as sp_integ
>>> f = lambda x : np.exp(-x**2)
>>> sp_integ.quad(f, -np.inf, np.inf)
(1.7724538509055159, 1.420263678441437e-08)
scipy.interpolate : Interpolation and smoothing
splines,
>>> import numpy as np
>>> import scipy.interpolate as sp_intep
>>> import matplotlib.pyplot as plt
>>> x1 = np.linspace(0, 1, 10) ; y1 = np.sin(2*np.pi*x1)
>>> cubic = sp_intep.interp1d(x1, y1, kind=’cubic’)
>>> x2 = np.linspace(0, 1, 50)
>>> y2 = cubic(x2)
>>> plt.plot(x1, y1, ’o’)
>>> plt.plot(x2, y2, ’-’)
>>> plt.show()
O. Wilk: Python, Scipy - f2py - ... Calcul scientifique/Math/Cnam