[Numpy-discussion] help with where

Mathew Yeates mathewww at charter.net
Fri Apr 20 16:51:25 EDT 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