title: Strange things about numpy indexing using empty ndarray
body: <p>When I do numpy indexing, sometimes the index can be an empty list, in that way I want numpy to also return a empty array. For example:</p>
  
  <pre><code>a = np.array([1, 2, 3])
  
  b = []
  
  print a[b]
  </code></pre>
  
  <p>This works perfectly fine! when the result gives me:</p>
  
  <pre><code>result:[]
  </code></pre>
  
  <p>But when I use ndarray as indexer, strange things happened:</p>
  
  <pre><code>a = np.array([1, 2, 3])
  
  b = []
  
  c = np.array(b)
  
  print a[c]
  </code></pre>
  
  <p>This gives me an error:</p>
  
  <pre><code>IndexError: arrays used as indices must be of integer (or boolean) type
  </code></pre>
  
  <p>However, When I do this:</p>
  
  <pre><code>a = np.array([1, 2, 3])
  
  b = []
  
  d = np.arange(0, a.size)[b]
  
  print a[d]
  </code></pre>
  
  <p>Then it works perfectly again:</p>
  
  <pre><code>result:[]
  </code></pre>
  
  <p>But when I check the type of c and d, they returns the same! Even the shape and everything:</p>
  
  <pre><code>print type(c), c.shape
  
  print type(d), d.shape
  
  result：&lt;type 'numpy.ndarray'&gt; (0L,)
  
  result：&lt;type 'numpy.ndarray'&gt; (0L,)
  </code></pre>
  
  <p>So I was wondering if there is anything wrong with it? How come a[c] doesn't work but a[d] works? Can you explain it for me? Thank you!</p>