large arrays in python (scientific)

Mark Grant markrgrant at yahoo.com
Mon Jan 7 18:25:23 EST 2002


I'm new to python programming.  I was hoping I could get some feedback
about some difficulty I'm having
creating a large array in python. 

I have a data set that contains values for positions in 3D space. 
There are about 2 million data points
(128x128x128).

I'm trying to fit a function to the data. I want to use the
LeastSquaresFit procedure in ScientificPython,
which takes an array of elements of the format:

[[(xposition1, yposition1, zposition1), value1],
[[(xposition2, yposition2, zposition2), value2],
...,
...,
]

When I try to create this array, I create about a million of the
elements, and then the script slows down and
eventually stops.  I'm not sure why this is happening. 

Thanks for any help.

Mark Grant
markrgrant at yahoo.com



More information about the Python-list mailing list