pymatrix (GitHUb) is a lightweight library for basic linear algebra operations.

Here is an example, for a linear system as follows:

3x+2y-z=12x-2y+4z=-2-x+.5y-z=0

It can be solved like:


from pymatrix import *

A = matrix([
[ 3.0, 2.0, -1.0],
[ 2.0, -2.0, 4.0],
[-1.0, .5, -1.0],
])

b = Matrix.FromString('''
1
-2
0
'''
)

print(A.inverse()*b)

There are some differences ways to instantiate a matrix. The matrix elements are iterable and indexable. A few dozens of matrix operations and functions are available. It’s written for both Python 2 and 3.

By the way, recently there is a PEP 465 about dedicated @ matrix operattor, you might want to check that out.