Re: [Numpy-discussion] help with where

2007-04-20 Thread Robert Kern
Mathew Yeates wrote: > Hi > I have a list of objects that I want to be interpreted numpy.where. What > class methods do I need to implement? __nonzero__ -- 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

[Numpy-discussion] help with where

2007-04-20 Thread Mathew Yeates
Hi I have a list of objects that I want to be interpreted numpy.where. What class methods do I need to implement? example: class A:pass a=A() a.i=1 b=A() b.i=0 numpy.where([a,b,a]) #desired result [0,2] Thanks Mathew ___ Numpy-discussion mailing list