C array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]]) linalg.lu(C) Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py",
Hi all, line 238, in lu p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) TypeError: object of type 'None' is not callable
For what reason ? Nils
the function linalg.lu seems to be defined for real matrices only. if you want to use it for complex ones, the fastest solution is probably to write a wrapper to the lapack function ZGETRF. it should work like in the real case (cfr. linalg/src/lu.f). regards, pietro. On Monday 14 July 2003 15:29, Nils Wagner wrote:
Hi all,
C
array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]])
linalg.lu(C)
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 238, in lu p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) TypeError: object of type 'None' is not callable
For what reason ?
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
even faster, if you don't need to permute the matrix: linalg.lu_factor(C) On Monday 14 July 2003 16:23, Pietro Berkes wrote:
the function linalg.lu seems to be defined for real matrices only. if you want to use it for complex ones, the fastest solution is probably to write a wrapper to the lapack function ZGETRF. it should work like in the real case (cfr. linalg/src/lu.f).
regards, pietro.
On Monday 14 July 2003 15:29, Nils Wagner wrote:
Hi all,
C
array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]])
linalg.lu(C)
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 238, in lu p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) TypeError: object of type 'None' is not callable
For what reason ?
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
Pietro Berkes schrieb:
even faster, if you don't need to permute the matrix: linalg.lu_factor(C)
BTW, how can I check the sign of \det(C)= \pm \det(U) ? P,L,U,info = linalg.lu(C) detA = \pm prod(diag(U)) Nils Remarks: \pm denotes plus minus... \det(A) = \det(P) \det(L) \det(U) = \det(P) \det(U)
On Monday 14 July 2003 16:23, Pietro Berkes wrote:
the function linalg.lu seems to be defined for real matrices only. if you want to use it for complex ones, the fastest solution is probably to write a wrapper to the lapack function ZGETRF. it should work like in the real case (cfr. linalg/src/lu.f).
regards, pietro.
On Monday 14 July 2003 15:29, Nils Wagner wrote:
Hi all,
C
array([[ 3.003+0.j, 1. +0.j, 0. +0.j, 0. +0.j], [ 3. +0.j, 3.003+0.j, 2. +0.j, 0. +0.j], [ 0. +0.j, 2. +0.j, 3.003+0.j, 3. +0.j], [ 0. +0.j, 0. +0.j, 1. +0.j, 2. +0.j]])
linalg.lu(C)
Traceback (most recent call last): File "<stdin>", line 1, in ? File "/usr/local/lib/python2.1/site-packages/scipy/linalg/decomp.py", line 238, in lu p,l,u,info = flu(a1,permute_l=permute_l,overwrite_a = overwrite_a) TypeError: object of type 'None' is not callable
For what reason ?
Nils
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
_______________________________________________ SciPy-user mailing list SciPy-user@scipy.net http://www.scipy.net/mailman/listinfo/scipy-user
participants (2)
-
Nils Wagner -
Pietro Berkes