[SciPy-User] Rerranging an array

Jose Gomez-Dans jgomezdans at gmail.com
Tue Nov 9 15:27:56 EST 2010


Hi,

I've been struggling to find a quick and clean way to do this. I have a 2d
array where each gridcell is either 0 or some integer. I then have another
array with the following setup
[ id_number, observation]. The id_number refer to the first array, and
indicates the position where observation goes. I basically want to convert
the second array into the same shape of the first array, but apart from
using lots of loops (the arrays are fairly large), all my other attempts are
failing miserably.

Any hints?

Thanks!
Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20101109/f91c615c/attachment.html>


More information about the SciPy-User mailing list