[Numpy-discussion] [ANN] NumPy 0.9.6 released

mfmorss at aep.com mfmorss at aep.com
Wed Mar 15 05:05:17 CST 2006


>matrix([[1, 0, 0],
>       [0, 1, 0],
>       [0, 0, 1]])
>
>
>>>>n.linalg.inverse(a)
>>>>
>>>>
>array([[ 1.,  0.,  0.],
>       [ 0.,  1.,  0.],
>       [ 0.,  0.,  1.]])
>
>I was asked to report if functions in linalg still don't honor the
>matrix input type; voila.
>

As someone who is just starting to experiment with numpy, may I ask, what
in general is the expected result of
numpy.linalg.inverse(integer_matrix)?  Since not all such inverses are
integer matrices, what does it mean to "honor the matrix input type?"  Is
there a matrix analogue of Python's integer scalar division?

Mark F. Morss
Principal Analyst, Market Risk
American Electric Power


                                                                           
             Travis Oliphant                                               
             <oliphant at ee.byu.                                             
             edu>                                                       To 
             Sent by:                  numpy-discussion                    
             numpy-discussion-         <numpy-discussion at lists.sourceforge 
             admin at lists.sourc         .net>                               
             eforge.net                                                 cc 
                                                                           
                                                                   Subject 
             03/14/2006 06:03          Re: [Numpy-discussion] [ANN] NumPy  
             PM                        0.9.6 released                      
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




Sven Schreiber wrote:

>>>>import numpy as n
>>>>n.__version__
>>>>
>>>>
>'0.9.6'
>
>
>>>>a = n.asmatrix(n.eye(3))
>>>>a
>>>>
>>>>

>
>
Thanks, but of course a.I should work, right?

>>>>n.linalg.cholesky(a)
>>>>
>>>>
>Traceback (most recent call last):
>  File "<interactive input>", line 1, in ?
>  File "C:\Python24\Lib\site-packages\numpy\linalg\linalg.py", line 135,
>in cholesky_decomposition
>    return transpose(triu(a,k=0)).copy()
>NameError: global name 'triu' is not defined
>
>I think I've seen this error before, was it in 0.9.4? This is a real
>show-stopper.
>
>

Thanks again,  it would be nice if you could help us by checking out an
SVN version before a release ;-)

But, better late than never.

Also, show-stopper might be a bit of an over-statement.   A dumb error,
yes.   But, if you really depend on this, then it's a simple fix to
place a from numpy.lib import * at the top of the linalg.py file.

Thanks again for your help.

-Travis



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live
webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion






More information about the Numpy-discussion mailing list