[Numpy-discussion] index of a value in an array

Chris Withers chris@simplistix.co...
Wed Oct 6 04:26:35 CDT 2010


Hi All,

Given an array such as:

array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

How can I find the index of a particular number in the array?

(ie: if it was a list, I'd do [1,2,3,4].index(3))

cheers,

Chris


More information about the NumPy-Discussion mailing list