[EMAIL PROTECTED] wrote:
> how can i find in an efficient way the index of the last occurrence of
> a given element in a numarray array?

Something like that:
>>> where(arange(100) == 10)
(array([10]),)
>>> _[-1][-1]
10

Or:
>>> your_array = arange(10)
>>> value = 3
>>> indices = where(your_array == value)
>>> last_index = indices[0][-1]
>>> print last_index

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to