Is there a way to add a numpy subarray to a given array from a certain index

前端 未结 0 587
耶瑟儿~
耶瑟儿~ 2021-01-19 16:39

Looking for something like

A = np.array([1, 2, 3, 4])
B = np.array([5, 7])
print A.add(B, 1) 
[1, 7, 10, 4]

potentially choosing axis to add

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