Update on Memory problem with NumPy arrays

Fredrik Lundh fredrik at pythonware.com
Wed Jun 21 21:03:13 CEST 2006

sonjaa wrote:

> Also, are there other python methods/extensions that can create
> multi-deminsional arrays?

if this example is typical for the code you're writing, you might as 
well use nested Python lists:

     def make_array(width, height, value):
         out = []
         for y in range(height):
             out.append([value] * width)

     y = make_array(501, 501, 1)
     z = make_array(501, 501, 0)

     y[ee][ff] = 4



More information about the Python-list mailing list