[Numpy-discussion] filters for rows or columns

Giuseppe Aprea giuseppe.aprea@gmail....
Tue Aug 25 13:07:36 CDT 2009


Hi list,


I wonder if there is any smarter way to apply a filter to a 2 dimensional array
than a for loop:

a=array(.......)
idxList=[]
for i in range(0,a.shape[1]):
       if (some condition on a[:,i]):
             idxList.append(i)


thanks in advance.

g


More information about the NumPy-Discussion mailing list