title: Return mask from numpy isin function in 1 dimension
body: <p>I am trying to use numpy's function isin to return a mask for a given query. For example, let's say I want to get a mask for element 2.1 in the numpy array below:</p>
  <pre><code>import numpy as np
  
  a = np.array(
      [
          [&quot;1&quot;, &quot;1.1&quot;],
          [&quot;1&quot;, &quot;1.2&quot;],
          [&quot;2&quot;, &quot;2.1&quot;],
          [&quot;2&quot;, &quot;2.2&quot;],
          [&quot;2.1&quot;, &quot;2.1.1&quot;],
          [&quot;2.1&quot;, &quot;2.1.2&quot;],
          [&quot;2.2&quot;, &quot;2.2.1&quot;],
          [&quot;2.2&quot;, &quot;2.2.2&quot;],
      ]
  )
  </code></pre>
  <p>I am querying it with the parameters <code>np.isin(a, &quot;2.1&quot;)</code>, but this returns another 2D array instead of a 1D mask:</p>
  <pre><code>[[False False]
   [False False]
   [False  True]
   [False False]
   [ True False]
   [ True False]
   [False False]
   [False False]]
  
  </code></pre>
  <p>I was expecting it would return something like:</p>
  <pre><code>[False False True False True True False False]
  </code></pre>
  <p>What am I supposed to do to fix this query?</p>