title: threshold in 2D numpy array
body: <p>I have an array of shape 512x512 which contains numbers between 0 and 100 at ith and jth position. Now I want to select array[i,j] &lt; 25 and zero at other places. I have tried with <code>array = array[where(array&lt;25)]</code>, which gives me a 1D array, but I want 2D. Please help me to solve this.</p>