PyNum, A multidimensional array where the elements are arrays?

Jack Liddle jack at thelobsterofmetal.com
Mon Dec 1 09:34:37 EST 2003


Hi there

I'm using Numerical Python to handle my arrays but I'm not sure how to
accomplish the following.

I want a NxNxNxN array where each element of the the array
(A[i,j,k,l]) is itself a 3x3 array.  So I can then slice my array
A[:,:,i,j] into planes and start grabbing matrices from it.  I need to
slice it in all possible planes and I don't want to start messing
around with nested lists.

How would I go about doing this in python, I guess in C I would have a
an NxNxNxN array full of pointers to matrix objects, but lifes to
short for C.

Thanks for any help you can give

Jack Liddle
Department Of Theoretical Physics
University Of Oxford




More information about the Python-list mailing list