From: Sasha <nd...@ma...> - 2006-08-10 18:41:36
|
Inverting a matrix with masked values does not make much sense. Call "filled" method with an appropriate fill value before passing the matrix to "inv". On 8/10/06, Daran L. Rife <dr...@uc...> wrote: > Hello, > > 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, > > > Daran > > > > > > ------------------------------------------------------------------------- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > _______________________________________________ > Numpy-discussion mailing list > Num...@li... > https://lists.sourceforge.net/lists/listinfo/numpy-discussion > |