Random Thoughts

from and to 372433 143758 48 N

Matrices et Python

August 24th, 2007 by Melaneum

Une bien jolie matrice sous la main, et on aimerait bien trouver son inverse:

from numpy import *
from numpy.linalg import *
a=array([[ 2.34635649, -1.36700425,  2.62820772, -1.93379678],
       [-0.1883465 ,  0.24001098, -0.16084023,  0.06769621],
       [-0.45821679,  0.66405128, -0.93736998,  0.47861882],
       [-1.23335039,  0.54581151, -1.04212985,  1.05308756]])



inva=inv(a)

Et pour vérifier tout ca: dot(a,inva) (on a bien une matrice identité).

This entry was posted on Friday, August 24th, 2007 at 18:44 CEST and is filed under Python. You can follow any responses to this entry through the RSS 2.0 feed. Responses are currently closed, but you can trackback from your own site.

Comments are closed.