Quansight-Labs / numpy_pytorch_interop

19 stars 4 forks source link

pick some low-hanging fruit in advanced indexing #146

Closed ev-br closed 1 year ago

ev-br commented 1 year ago

The main change here is to allow a list (here, [2, 3, 4]) in the right-hand side of

a = np.zeros((5, 5))
a[[[0], [1], [2]], [0, 1, 2]] = [2, 3, 4]