Multidimensional arrays - howto?

Colin J. Williams cjw at sympatico.ca
Wed Feb 16 12:56:12 EST 2005


doodle4 at gmail.com wrote:
> Hello all,
> 
> I am trying to convert some C code into python. Since i am new to
> python, i would like to know how to deal with multidimensional arrays?
> 
> Thanks,
> -Joe
> 
> Here's a snippet of what i am trying to convert:
> 
> # define table0 15
> # define table1 20
> 
> unsigned int Table[table0][table1]
> 
> if(Table[table0][table1] != 0)
>     {
>          Table[table0][table1]--
>     }
> 
You might consider numarray.  This is a package which is downloadable 
from Source Forge and intended for numeric and other arrays.

Colin W.



More information about the Python-list mailing list