Actually never mind either. I guessed I needed to append all values
after eachother in one row list:
x = []
for y in buff:
for z in y:
x.append(z)
thanks for the help
--
http://mail.python.org/mailman/listinfo/python-list
Sorry this is the latest, the previous didn't work so well:
import Image
x = []
buff = []
buff = [[0 for y in range(41)] for x in range(21)]
buff[0][(len(buff[0])-1)/2] = 1
def rule1():
for i in range(len(buff)-1):
for j in range(len(buff[0])-1):
if i == len(buff)-1:
import Image
x = []
buff = []
buff = [[0 for y in range(41)] for x in range(21)]
buff[0][(len(buff)-1)/2] = 1
def rule1():
for i in range(len(buff)-1):
for j in range(len(buff[0])-1):
if i == len(buff)-1:
break
elif j == 0:
if buf
It seemed to work with a 1d list but not with 2d.
--
http://mail.python.org/mailman/listinfo/python-list
Thank you very much. That is highly simple, useful and it works.
--
http://mail.python.org/mailman/listinfo/python-list
<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello. I have recently been experimenting with cellular automata and I
> would like to know how I could convert a 2d list of 0's and 1's into
> white and black squares on an image. I have tried to install matplotlib
> and also NumTut b
[EMAIL PROTECTED] wrote:
> Hello. I have recently been experimenting with cellular automata and I
> would like to know how I could convert a 2d list of 0's and 1's into
> white and black squares on an image. I have tried to install matplotlib
> and also NumTut but both to no avail. There seem to be
Hello. I have recently been experimenting with cellular automata and I
would like to know how I could convert a 2d list of 0's and 1's into
white and black squares on an image. I have tried to install matplotlib
and also NumTut but both to no avail. There seem to be bugs in their
installation and I