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

Robert Kern robert.kern at gmail.com
Mon Sep 29 21:22:14 EDT 2008


On Mon, Sep 29, 2008 at 20:16, frank wang <f.yw at hotmail.com> 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(aa>2)
>   <stdin>(1)<module>()
>> c:\dhg\docsis\lab_test\parseadc.py(70)parsempeg()
> -> bb=array(fid).astype('int')
> (Pdb)
>
> It does not return any result.

It's worth noting that that is not a "debug mode" of the interpreter;
it's the pdb debugger, a separate piece of software which is used in
an entirely different manner. Specifically, pdb has a "where" command
which is what you are getting here.

(Pdb) ?where
w(here)
Print a stack trace, with the most recent frame at the bottom.
An arrow indicates the "current frame", which determines the
context of most commands.  'bt' is an alias for this command.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco



More information about the NumPy-Discussion mailing list