Can I slice a numpy array using an array of indices?

后端 未结 0 705
野趣味
野趣味 2021-01-29 06:45

I have 2 numpy arrays:

a = np.array([[1, 2, 3],
              [4, 5, 6],
              [7, 8, 9]])

b = np.array([0, 1, 2])

I want to use b as in

相关标签:
回答
  • 消灭零回复
提交回复
热议问题