AG I want to do drizzling with numpy. It should be trivial, but it's impossible (without a for loop, afaik) instead. In [2]: a = array([1,1,2,2])In [3]: b = arange(5)In [4]: b[a] += 1In [5]: bOut[5]: array([0, 2, 3, 3, 4])In [6]: # but b should really be:In [7]: b[a] += 1In [8]: bOut[8]: array([0, 3, 4, 3, 4])
Page 1 / 1