[Tutor] First real script

Alan Gauld alan.gauld at btinternet.com
Tue Nov 7 11:56:40 CET 2006


"Carlos" <carloslara at web.de> wrote

> As you may have noticed the name of the script has changed, I will 
> now
> try a 3D CA. I have been thinking that the best way to do this would 
> be
> to use a matrix, like those found in SciPy. Do you think this is a 
> good
> idea?

Using a matrix is fine but unless you are using any of the other
Scipy features you can just use a vanilla two dimensional Python
list

matrix = [][]

Or to initialise it too:

matrix = [[0]*width for n in range(height)]

Just a thought,

Alan G. 




More information about the Tutor mailing list