[Numpy-discussion] Help with linear_least_squares

Brad Malone brad.malone@gmail....
Wed Mar 28 12:54:54 CDT 2007

Hi, I'm running into an error with linear least squares that I'm not sure
what to do about.  For reference, I'm trying to fit a curve corresponding to
the example at the bottom of this wikipedia page:

My code looks like this:

from numpy import *
import LinearAlgebra
b.shape= (4,1)

And I'm getting the following error:
 File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/site-packages/Numeric/LinearAlgebra.py", line
410, in linear_least_squares
    t =_commonType(a, b)
  File "/usr/lib/python2.4/site-packages/Numeric/LinearAlgebra.py", line 30,
in _commonType
    t = a.typecode()
AttributeError: 'numpy.ndarray' object has no attribute 'typecode'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20070328/5864deba/attachment.html 

More information about the Numpy-discussion mailing list