I'm having trouble changing the values in a numpy array. I have already set up the array of zeros. Pvfv is present value and future value
pvfv=np.zeros((7,5))
print(pvfv)
Output:
[[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 0.00 0.00 0.00 0.00]]
Now I want to use np.array change row 0 to look like, keeping the rest of the array constant:
[[ 0.00 1.00 2.00 3.00 4.00]
[ 0.00 0.00 0.00 0.00 0.00]
[ 0.00 .....
pvfv=np.zeros((7,5)); pvfv[0,:] = np.array([i for i in range(pvfv.shape[1])])