fill in 3D array

knielsen73 at gmail.com knielsen73 at gmail.com
Thu Jul 24 03:06:50 CEST 2008


Hi,

I am a python newbie, trying to convert my IDL scripts to python. I am
kind of stuck at the moment. I am reading in a 1-D data file with 2000
data points. I need to put them in a 3-D array with size [10,10,20]. I
have defined the field array as arr = zeros((10,10,20)) but don't know
how to read the data into the array.

Also, I need to extract a slice of a 3-D array and tried a =
array_name(:,:,20) but that didn't work.

Thanks,
 Kim



More information about the Python-list mailing list