[SciPy-user] solving linear equations ?

Stef Mientki s.mientki@ru...
Wed Nov 5 13:46:59 CST 2008


hello,

(forgive my math is a bit rusty, so I don't know the right terms anymore)

If I want to solve a set of linear equations,
I use in MatLab:

  a \ b

this works also if I have too many equations, so more columns than rows.
In Numpy for Matlab users

http://www.scipy.org/NumPy_for_Matlab_Users

I read this:
  linalg.solve(a,b) if a is square
     linalg.lstsq(a,b) otherwise

I find the name already suspicious, sound like least square,
which is confirmed by the help.

So I guess the translation from MatLab to Numpy is not correct.

Is there a function to reduce the number of columns / remove the 
redundancy, so I end up with a square matrix ?

thanks,
Stef Mientki


More information about the SciPy-user mailing list