title: shape mismatch: indexing arrays could not be broadcast together with shapes
body: <pre><code>j=np.arange(20,dtype=np.int)
  site=np.ones((20,200),dtype=np.int)
  sumkma=np.ones((100,20))
  
  [sumkma[site[x],x] for x in range(20)]
  </code></pre>
  
  <p>This works, but I don't want to use for loop. When I try</p>
  
  <pre><code>sumkma[site[j],j]
  </code></pre>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (20,200) (20,) </p>
  </blockquote>
  
  <p>How to fix the error? </p>