Is it possible in numpy to use advanced list slicing and still get a view?

In other words, I want to do something like

A[[-1, 0, 1], [2, 3, 4]] += np.ones((3, 3))

instead of

A[-1:3, 2:5] += np.ones((1, 3))
A[0:2, 2:5] += np.ones((2, 3))
6
задан cheshire 25 August 2010 в 02:09
поделиться