Understanding references: why this Numpy assignment is not working?

前端 未结 0 1479
無奈伤痛
無奈伤痛 2021-01-18 00:43

I have a little test code like so:

import numpy as np

foo = np.zeros(1, dtype=int)
bar = np.zeros((10, 1), dtype=int)


foo_copy = np.copy(foo)
bar[-1] = foo         


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