Thresholded pixel indices of a NumPy array
<p>I'm sure this question is Googleable, but I don't know what keywords to use. I'm curious about a specific case, but also about how to do it in general. Lets say I have a RGB image as an array of shape <code>(width, height, 3)</code> and I want to find all the pixels where the red channel is greater than 100. I feel like <code>image &gt; [100, 0, 0]</code> should give me an array of indices (and would if I was comparing a scalar and using a greyscale image) but this compares each element with the list. How do I compare over the first two dimensions where each "element" is the last dimension? </p>