[Scipy-tickets] [SciPy] #1458: lu_factor gives different results, depending on whether the input is C or Fortran contiguous (also affects lu_solve)

SciPy Trac scipy-tickets@scipy....
Thu Jun 9 11:15:00 CDT 2011


#1458: lu_factor gives different results, depending on whether the input is C or
Fortran contiguous (also affects lu_solve)
--------------------------+-------------------------------------------------
 Reporter:  mike.wimmer   |       Owner:  somebody
     Type:  defect        |      Status:  new     
 Priority:  normal        |   Milestone:          
Component:  scipy.linalg  |     Version:  0.9.0   
 Keywords:                |  
--------------------------+-------------------------------------------------

Comment(by josefpktd):

 problem here, with official scipy 0.9.0 (mingw) installer on Windows 7

 {{{
 >>> import scipy
 >>> scipy.__version__
 '0.9.0'
 >>> import scipy.linalg as la

 >>> A=np.array([[2,1],[0,1.]])
 >>> la.lu_factor(A)
 (array([[ 2. ,  0.5],
        [ 0. ,  1. ]]), array([0, 1]))

 >>> la.lu_factor(np.asfortranarray(A))
 (array([[ 2.,  1.],
        [ 0.,  1.]]), array([0, 1]))
 >>> la.lu_factor(np.asfortranarray(A).T)
 (array([[ 2.,  0.],
        [ 1.,  1.]]), array([0, 1]))
 >>> la.lu_factor(A.T)
 (array([[ 2. ,  0. ],
        [ 0.5,  1. ]]), array([0, 1]))
 >>> la.lu_factor(A.T.copy())
 (array([[ 2.,  0.],
        [ 1.,  1.]]), array([0, 1]))
 }}}

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1458#comment:3>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list