Numpy: how to select items in numpy and assign its value

后端 未结 1 1292
北荒
北荒 2021-01-29 10:22

I have got a problem in assigning new value by list.

I want to change 12 items values in s numpy by numpy array\'s index ,and i hope every index i choose is different. s

相关标签:
1条回答
  • 2021-01-29 10:44

    I'm not totally sure what you're trying to achieve here, but s(i) is your problem: round brackets imply a function call, but s is a numpy array, so this won't work . I think you're trying to index the list, in which case you'd use s[i].

    0 讨论(0)
提交回复
热议问题