I have a question about Jupyter arrays. I have a zero array A0 and want to replace say (n-2)-th element with a value defined in previous line in equation.
n=10
A0=np.repeat(0,int(n+1))
lambda_iz=0.05
A0[int(n-2)]=np.array([-4*lambda_iz])
#doesn't work here, but in another vector the same method works!
Further more I need your help with displaying decimal digits of array. I am using following approach, but it doesn't work.
print(A0)
np.set_printoptions(precision=5)
print(A0)
lukezo
n=10
A0=np.repeat(0,int(n+1))
lambda_iz=0.05
A0[int(n-2)]=np.array([-4*lambda_iz])
#doesn't work here, but in another vector the same method works!
Further more I need your help with displaying decimal digits of array. I am using following approach, but it doesn't work.
print(A0)
np.set_printoptions(precision=5)
print(A0)
lukezo