[Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread frank wang
Hi, I am trying to find a command in numpy or python that perform similar function as Matlab find command. It will return the indexes of array that satisfy a condition. So far I have not found anything. Thanks Frank Date: Thu, 25 Sep 2008 09:51:46 +0200 From: [EMAIL PROTECTED] To:

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread Nathan Bell
On Mon, Sep 29, 2008 at 5:32 PM, frank wang [EMAIL PROTECTED] wrote: Hi, I am trying to find a command in numpy or python that perform similar function as Matlab find command. It will return the indexes of array that satisfy a condition. So far I have not found anything. If you're familiar

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread Travis E. Oliphant
frank wang wrote: Hi, I am trying to find a command in numpy or python that perform similar function as Matlab find command. It will return the indexes of array that satisfy a condition. So far I have not found anything. There are several ways to do this, but what are you trying to do?

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread frank wang
) It does not return any result. Frank Date: Mon, 29 Sep 2008 16:48:23 -0500 From: [EMAIL PROTECTED] To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] Are there command similar as Matlab find command? frank wang wrote: Hi,I am trying to find a command in numpy or python

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread Robert Kern
On Mon, Sep 29, 2008 at 20:16, frank wang [EMAIL PROTECTED] wrote: Thanks for the help. It seems that the where command has problem when I tried to run it in the debug mode. It does not return any thing such as: (Pdb) aa=array([1,2,3,4] (Pdb) where(aa2) stdin(1)module()

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread frank wang
appreciate the help I got from the forum. Frank Date: Mon, 29 Sep 2008 20:22:14 -0500 From: [EMAIL PROTECTED] To: numpy-discussion@scipy.org Subject: Re: [Numpy-discussion] Are there command similar as Matlab find command? On Mon, Sep 29, 2008 at 20:16, frank wang [EMAIL PROTECTED] wrote

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread David Cournapeau
frank wang wrote: Hi, Robert, Thank you very much for clarification of this. I really do not know the difference of debug mode and the pdb debugger. That's totally different in principle. Debug mode means your code is compiled/interpreted differently to keep as much information as

Re: [Numpy-discussion] Are there command similar as Matlab find command?

2008-09-29 Thread Anne Archibald
2008/9/30 frank wang [EMAIL PROTECTED]: I really do not know the difference of debug mode and the pdb debugger. To me, it seems that pdb is only way to debug the python code. How do the expert of numpy/python debug their code? Are there any more efficient way to debug the code in python