[Numpy-discussion] finding index in an array...
Sat Jun 13 03:38:39 CDT 2009
firstname.lastname@example.org a écrit :
> something like this should work to find rows with specific elements,
> if I understand you correctly.
You did ;-)
> np.nonzero(A.view([('',float)]*3) == np.array((1,2,3),[('',float)]*3))
> It creates an extra dimension, that needs to be removed with , but
> it takes to long now, to remember how to get rid of it.
Ok, I get it.
BTW, I was thinking this was a FAQ and there was a more straightforward
answer, or a buitlin function to do the trick...
More information about the Numpy-discussion