Filter one array according to data in another array
<p>I have two arrays of random numbers, <code>X</code> and <code>Y</code>. X represents x-coordinates and <code>Y</code> represents y-coordinates. I want to filter <code>X</code> such that I only keep indices <code>i</code> of <code>X</code> where:</p>

<pre><code>X[i]^2 + Y[i]^2 &lt; 1
</code></pre>

<p>I know how to filter with values in 1 array but since I need to use 2, I am not sure what to do. I am not allowed to use loops of any kind.</p>

<pre><code>for ind,(a,b) in enumerate(zip(x,y)) :
     if (a**2 + b**2) &lt; 1 :
        print ind
</code></pre>

python arrays numpy