2008/9/17 paul taney <[EMAIL PROTECTED]>:
>> # silly algorithm for guessing blue pixels
>> >>> bluemask = (a[...,2] > 1.25*a[...,1]) & (a[...,2] > 1.25*a[...,0])
>
> Thanks Stéfan, that"s very cool.  But the xy coords were tossed.
> Can you show me a cheap way to return a line:
>
>    line=[(3, 0), (2, 1), (0, 2), (1, 2), (3, 2), (0, 3), (4, 3), (3, 4)]
>
> type-o-thing?

Sure, how about

np.array(bluemask.nonzero()).swapaxes(0,1)

Does that do what you want?

Cheers
Stéfan
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to