Re: get array element

2008-04-10 Thread Robert Kern
[EMAIL PROTECTED] wrote: > I have an array, and I would like to get the indice value. > > a = array([13,14,15,16]) > > I would like something like a.getindice(15) > > If I want 15 it would return 2 You will want to ask numpy questions on the numpy mailing list. If you don't mention that you ar

Re: get array element

2008-04-10 Thread Jason Scheirer
On Apr 10, 10:22 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have an array, and I would like to get the indice value. > > a = array([13,14,15,16]) > > I would like something like a.getindice(15) > > If I want 15 it would return 2 a.index(15) -- http://mail.python.org/mailman/listinfo/p

Re: get array element

2008-04-10 Thread Ivan Illarionov
On Apr 10, 9:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have an array, and I would like to get the indice value. > > a = array([13,14,15,16]) > > I would like something like a.getindice(15) > > If I want 15 it would return 2 >>> a = array('i', [13,14,15,16]) >>> a.index(15) 2 -- ht

get array element

2008-04-10 Thread [EMAIL PROTECTED]
I have an array, and I would like to get the indice value. a = array([13,14,15,16]) I would like something like a.getindice(15) If I want 15 it would return 2 -- http://mail.python.org/mailman/listinfo/python-list