title: Finding Element in Array Indicing Syntax Explanation
body: <p>I have an array in Python that looks like this:</p>
  <pre><code>array = [[UUID('0d9ba9c6-632b-4dd4-912c-e8ff0a7134f7'), array([['1', '1']], dtype='&lt;U21')], [UUID('9cb1feb6-0ef4-4e15-9070-7735545d12c9'), array([['2', '1']], dtype='&lt;U21')], [UUID('955d308b-3570-4166-895e-81a077e6b9f9'), array([['3', '1']], dtype='&lt;U21')]]
  </code></pre>
  <p>I also have a query that looks like this:</p>
  <pre><code>query = UUID('0d9ba9c6-632b-4dd4-912c-e8ff0a7134f7')
  </code></pre>
  <p>I am trying to find the sub-array in the main array that contains this UUID. So, querying this would return in:</p>
  <pre><code>[UUID('0d9ba9c6-632b-4dd4-912c-e8ff0a7134f7'), array([['1', '1']], dtype='&lt;U21')]
  </code></pre>
  <p>I found this syntax online to do this:</p>
  <pre><code>out = array[array[:, 0] == query]
  </code></pre>
  <p>I know that this only works in NumPy if the array itself is an NP array. But why does this work and how? I am extremely confused by the syntax.</p>