I want to find the indices of all the None objects in an object array: >> import numpy as np >> i = np.array([0, 1, 2, None, 3, 4, None]) >> np.where(i == None) ()
Using == doesn't work the same way on object arrays as it does on, say, an array of int32. Any suggestions? Do I have to use a loop or list comprehension, like this? >> [ ii for (ii, id) in enumerate(i) if id == None ] Thanks, Martin _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
