title: Why aren't my data being masked?
body: <pre><code>data = [[0, 1, 1, 5, 5, 5, 0, 2, 2, 2, 2, 2, 2, 2, 6, 6, 6, 6, 6, 6, 6, 6],
          [1, 1, 1, 0, 5, 5, 5, 0, 2, 2, 0, 0, 2, 0, 0, 6, 6, 6, 0, 0, 6, 6],
          [1, 1, 1, 0, 0, 0, 0, 0, 2, 2, 0, 2, 2, 2, 0, 0, 2, 6, 0, 0, 6, 6]]
  </code></pre>
  
  <p>The data object i have is a <code>&lt;class 'numpy.ndarray'&gt;</code></p>
  
  <p>Knowing data is a numpy object i did the following:</p>
  
  <pre><code>data = np.array(data)
  </code></pre>
  
  <p>i want to set the numbers inside a list i give as input to 0, what i tried:</p>
  
  <pre><code>data[~np.isin(data,[2,4])] = 0
  </code></pre>
  
  <p>i expect all the 2 and 4 occurrences in the previous matrix to be 0 and the rest to keep their values, what i got:</p>
  
  <blockquote>
    <p>TypeError: only integer scalar arrays can be converted to a scalar index</p>
  </blockquote>
  
  <p>also tried to give data as a numpy array using <code>np.array</code> gave error as well.</p>