title: output of numpy.where(condition) is not an array, but a tuple of arrays: why?
body: <p>I am experimenting with the <code>numpy.where(condition[, x, y])</code> function.<br>
  From the <a href="http://docs.scipy.org/doc/numpy-1.10.1/reference/generated/numpy.where.html" rel="noreferrer">numpy documentation,</a> I learn that if you give just one array as input, it should return the indices where the array is non-zero (i.e. "True"):</p>
  
  <blockquote>
    <p>If only condition is given, return the tuple condition.nonzero(), the
    indices where condition is True.</p>
  </blockquote>
  
  <p>But if try it, it returns me a <em>tuple</em> of two elements, where the first is the wanted list of indices, and the second is a null element:</p>
  
  <pre><code>&gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; array = np.array([1,2,3,4,5,6,7,8,9])
  &gt;&gt;&gt; np.where(array&gt;4)
  (array([4, 5, 6, 7, 8]),) # notice the comma before the last parenthesis
  </code></pre>
  
  <p>so the question is: why? what is the purpose of this behaviour? in what situation this is useful?
  Indeed, to get the wanted list of indices I have to add the indexing, as in <code>np.where(array&gt;4)[0]</code>, which seems... "ugly".</p>
  
  <hr>
  
  <p>ADDENDUM</p>
  
  <p>I understand (from some answers) that it is actually a tuple of just one element. Still I don't understand why to give the output in this way. To illustrate how this is not ideal, consider the following error (which motivated my question in the first place):</p>
  
  <pre><code>&gt;&gt;&gt; import numpy as np
  &gt;&gt;&gt; array = np.array([1,2,3,4,5,6,7,8,9])
  &gt;&gt;&gt; pippo = np.where(array&gt;4)
  &gt;&gt;&gt; pippo + 1
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  TypeError: can only concatenate tuple (not "int") to tuple
  </code></pre>
  
  <p>so that you need to do some indexing to access the actual array of indices:</p>
  
  <pre><code>&gt;&gt;&gt; pippo[0] + 1
  array([5, 6, 7, 8, 9])
  </code></pre>