title: What is the purpose of numpy.where returning a tuple?
body: <p>When I run this code:</p>
  
  <pre><code>import numpy as np
  a = np.array([1, 2, 3, 4, 5, 6])
  print(np.where(a &gt; 2))
  </code></pre>
  
  <p>it would be natural to get an array of indices where <code>a &gt; 2</code>, i.e. <code>[2, 3, 4, 5]</code>, but instead we get:</p>
  
  <pre><code>(array([2, 3, 4, 5], dtype=int64),)
  </code></pre>
  
  <p>i.e. a tuple with empty second member.</p>
  
  <p>Then, to get the the "natural" answer of <code>numpy.where</code>, we have to do:</p>
  
  <pre><code>np.where(a &gt; 2)[0]
  </code></pre>
  
  <p><strong>What's the point in this tuple? In which situation is it useful?</strong></p>
  
  <p>Note: I'm speaking here only about the use case <code>numpy.where(cond)</code> and not <code>numpy.where(cond, x, y)</code> that also exists (see documentation).</p>