[Numpy-discussion] Problem with numpy.linalg.inv in numpy 1.01b on Mac OS X 10.4 Tiger (8.7.0)

Daran L. Rife drife at ucar.edu
Thu Aug 10 08:33:44 CDT 2006


I am a veteran user of Numeric and am trying
out the latest version of numpy (numpy 1.01b)
on Mac OS X 10.4 Tiger (8.7.0).

When trying to invert a matrix with
numpy.linalg.inv I get the following error:


Traceback (most recent call last):
  File "./bias_correction.py", line 381, in ?
    if __name__ == "__main__": main()
  File "./bias_correction.py", line 373, in main
    (index_to_stnid, bias_and_innov) = calc_bias_and_innov(cf, stn_info,
obs, infile_obs, grids, infile_grids)
  File "./bias_correction.py", line 297, in calc_bias_and_innov
    K = make_kalman_gain(R, P_local, H)
  File "./bias_correction.py", line 157, in make_kalman_gain
    K = MA.dot( MA.dot(P, MA.transpose(H)), inv(MA.dot(H, MA.dot(P,
MA.transpose(H))) + R ) )
  File "/opt/python/lib/python2.4/site-packages/numpy/linalg/linalg.py",
line 149, in inv
    return wrap(solve(a, identity(a.shape[0], dtype=a.dtype)))
TypeError: __array_wrap__() takes exactly 3 arguments (2 given)


Is this a known problem, and if so, what is the fix?

Thanks very much,


More information about the Numpy-discussion mailing list