title: Numpy Advanced Indexing: same index used multiple times in +=
body: <p>Suppose you have the following code</p>
  
  <pre><code>a = np.ones(8)
  pos = np.array([1, 3, 5, 3])
  
  a[pos] # returns array([ 1.,  1.,  1.,  1.]), where the 2nd and 4th el are the same
  a[pos] +=1 
  </code></pre>
  
  <p>The last instruction returns</p>
  
  <pre><code>array([ 1.,  2.,  1.,  2.,  1.,  2.,  1.,  1.])
  </code></pre>
  
  <p>But I'd like that assignments over same indices to be summed up, so as to obtain</p>
  
  <pre><code>array([ 1.,  2.,  1.,  3.,  1.,  2.,  1.,  1.])
  </code></pre>
  
  <p>Someone has already experienced this same situation?</p>