Extract elements from numpy array, that are not in list of indexes
<p>I want to do something similar to what was asked here <a href="https://stackoverflow.com/questions/16940895/numpy-array-change-the-values-that-are-not-in-a-list-of-indices">NumPy array, change the values that are NOT in a list of indices</a>, but not quite the same.</p>

<p>Consider a <code>numpy</code> array:</p>

<pre><code>&gt; a = np.array([0.2, 5.6, 88, 12, 1.3, 6, 8.9])
</code></pre>

<p>I know I can access its elements via a list of indexes, like:</p>

<pre><code>&gt; indxs = [1, 2, 5] 
&gt; a[indxs]
array([  5.6,  88. ,   6. ])
</code></pre>

<p>But I also need to access those elements which are <em>not</em> in the <code>indxs</code> list. Naively, this is:</p>

<pre><code>&gt; a[not in indxs]
&gt; array([0.2, 12, 1.3, 8.9])
</code></pre>

<p>What is the proper way to do this?</p>