PyNum, A multidimensional array where the elements are arrays?
Andrew McLean
spam-trap-095 at at-andros.demon.co.uk
Mon Dec 1 17:48:08 EST 2003
In article <9832606.0312010634.170e50d3 at posting.google.com>, Jack Liddle
<jack at thelobsterofmetal.com> writes
>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.
Is there any reason not to just use an NxNxNxNx3x3 array?
If you do this then the 3x3 matrices look like A[i,j,k,l,:,:]
--
Andrew McLean
More information about the Python-list
mailing list