Little correction, only c[(2,3)] gives me what I expect, not c[[2,3]], which is even stranger.
2007/10/28, Matthieu Brucher <[EMAIL PROTECTED]>: > > Hi, > > I'm trying to get an item in an array when I only have another array > giving the position. > > For instance: > > >>> c = numpy.arange(0., 3*4*5).reshape((3,4,5)) > >>> c***(numpy.array ((2,3), dtype=int)) > [55, 56, 57, 58, 59] > > I'm trying to figure what to put between c and ((2,3)). I supposed that > the take method would be what I wanted but it is not... The [] operator does > not work on array(but it seems to give the expected result with a tuple or a > list). Is there a method for this ? > > Matthieu > > -- > French PhD student > Website : http://miles.developpez.com/ > Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92 -- French PhD student Website : http://miles.developpez.com/ Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
_______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
