[Numpy-discussion] question on differential results in windows and debian

meng at are.berkeley.edu meng at are.berkeley.edu
Wed Oct 12 13:58:26 CDT 2005


>Hi there-
>
>I have a matrix X, calculate cX=matrixmultiply(transpose(X), X) and 
>finally invert it by icX = linear_algebra.inverse(cX)
>cX is kind of ill-conditioned, which caused the icX differs a lot between 
>windows and debian, after a tiny difference on cX across platforms. I 
>don't understand why a multiplication of a matrix and its transpose will 
>create a tiny difference across windows and debian, which could be 
>disastrous when inverting it.

Here are the results:
>In windows:
> >>> cX = matrixmultiply(transpose(x), x)
> >>> cX.min()
>-666.96857541904126
> >>> cX.max()
>1073.3945530725441
> >>> import numarray.linear_algebra as la
> >>> icX = la.inverse(cX)
> >>> icX.min()
>-3287030277.3580685
> >>> icX.max()
>0.0
>
>In debian:
> >>> cX = matrixmultiply(transpose(x), x)
> >>> cX.min()
>-666.96857541898294
> >>> cX.max()
>1073.3945530726264
> >>> import numarray.linear_algebra as la
> >>> icX = la.inverse(cX)
> >>> icX.min()
>0.0
> >>> icX.max()
>84778028554.337051
>
>Thanks a lot for your time! BTW, I am using Python2.4 and numarray 1.3.2 
>in both machines.
>
>Best,
>Xiangyi
>
>Xiangyi Meng
>Department of Agricultural and Resource Economics
>Room 303, Giannini Hall #3310
>University of California, Berkeley
>Berkeley, CA 94720-3310
>Tel:  (510) 643-4124
>Fax: (510) 643-8911
>Email: meng at are.berkeley.edu
>

Best,
Xiangyi

Xiangyi Meng
Department of Agricultural and Resource Economics
Room 303, Giannini Hall #3310
University of California, Berkeley
Berkeley, CA 94720-3310
Tel:  (510) 643-4124
Fax: (510) 643-8911
Email: meng at are.berkeley.edu
           





More information about the Numpy-discussion mailing list