[SciPy-user] Matlab to scipy

Pearu Peterson pearu at scipy.org
Fri Oct 24 09:16:52 EDT 2003



On Fri, 24 Oct 2003, Nils Wagner wrote:

> Dear experts, 
>  
> I tried to convert the following Matlab code to scipy. 
> (LU-factorization with complete pivoting) 
> http://www1.mate.polimi.it/~calnum/programs.html 
>  
> However it failed. Any help would be appreciated 

Notice that lines

> [y,i]=max(abs(A(k:n,k:n))); 

in Matlab and

> y,i = MLab.max(abs(A[k:n,k:n])) 

in Python are not equivalent. The latter just fails with exception
  ValueError: too many values to unpack

Hopefully this hint is enough for you to fix your code,
	Pearu



More information about the SciPy-User mailing list