title: Check if every element in 2D numpy array is in set
body: <p>I want to efficiently check, for every element in a numpy array, whether that element is present in a set.  For example:</p>
  <pre><code>segmask = np.array([[1,2,3,4]])
  numbers = {2,4}
  check_if_in_set(numbers, segmask)
  </code></pre>
  <p>should return</p>
  <pre><code>[[False  True False  True]]
  </code></pre>
  <p>or similar.</p>