Comparing a matrix (list[][]) ?

Colin J. Williams cjw at sympatico.ca
Sun Jan 14 09:39:30 EST 2007


jairodsl wrote:
> Hi,
> 
> How can I find the minus element greater than zero in a matrix, my
> matrix is
> 
> matrix=
> [9,8,12,15],
> [0,11,15,18],
> [0,0,10,13],
> [0,0,0,5]
> 
> I dont want to use "min" function because each element in the matrix is
> associated to (X,Y) position.
> 
> Thanks a lot.
> 
> jDSL
> 

You might consider numarray or numpy for this sort of thing.

Colin W.




More information about the Python-list mailing list