Here, I&#x27;ll use logical indexing to pull out all the positive even numbers from this array of random integers:<p>Numpy:<p><pre><code>  a = np.random.random_integers(low = -100, high = 100, size = (100,))
  a[np.logical_and(a % 2 == 0, a &gt; 0)</code></pre>
(or a[(a % 2 == 0) * (a &gt; 0)])<p>Logical indexing is used everywhere in numerical computing. Using functions like logical_and() or boolean multiplication or addition is more difficult to follow than Matlab or Julia.<p>Julia:<p><pre><code>  a = rand(-100:100, 100)
  a[(a % 2 .== 0) &amp; (a .&gt; 0)]
</code></pre>
Well, that&#x27;s beautiful. Element-wise operations are prefixed with &quot;.&quot;