Assign values from another array using indices keeping initial values

后端 未结 0 486
Happy的楠姐
Happy的楠姐 2021-01-07 02:38

Given an array:

import numpy as np

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

An array of indices:

indices = np.array([0, 2, 4])


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