Update on Memory problem with NumPy arrays
Fredrik Lundh
fredrik at pythonware.com
Wed Jun 21 15:03:13 EDT 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)
return
y = make_array(501, 501, 1)
z = make_array(501, 501, 0)
y[ee][ff] = 4
etc
</F>
More information about the Python-list
mailing list