I'm not sure how to explain why I want to do this but...why does this code
x = np.array([1,2,3,4])
d = np.empty((0, 4))
d = np.append(d,[x],axis=0)
x[0]=8
d = np.append(d,[x],axis=0)
give me this
array([[ 1., 2., 3., 4.],
[ 8., 2., 3., 4.]])
while this code
x = np.array([1,2,3,4])
d = np.empty((0, 4))
d = np.append(d,[x],axis=0)
x = d[0,]
x[0]=8
d = np.append(d,[x],axis=0)
gives me this?
array([[ 8., 2., 3., 4.],
[ 8., 2., 3., 4.]])
Thanks in advance for any help here!