[Numpy-discussion] help with where

Mathew Yeates mathewww@charter....
Fri Apr 20 15:51:25 CDT 2007


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



More information about the Numpy-discussion mailing list