[SciPy-User] problems handling a numpy array
Gabriele Brambilla
gb.gabrielebrambilla at gmail.com
Wed Apr 30 11:10:47 EDT 2014
Hi,
I have a 4d numpy array.
I want to select an "index" of the fourth dimension to obtain a 3d array.
I try to di it in this way:
MYMAP = MYMAPS[:, :, :, 1]
that is defined in this way:
MYMAPS = [np.zeros([npha, nobs, nex, last-first+1], dtype=float)]
but I receive an error:
TypeError: list indices must be integers, not tuple
what am I doing wrong?
thanks
Gabriele
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20140430/57ff8866/attachment.html>
More information about the SciPy-User
mailing list