I am new to python and programming. Sadly, I got a problem working on a easy task very soon and could not find a answer to this. In the following, I make up a short example:
a0=np.ones(10);
a1=a0;
a2=a0;
sum1=3;
sum2=2;
a1[0]=sum1;
a2[0]=sum2;
print(a1)
However, the first element of the array a1 is 2 instead of 3. Would someone like to explain to me why and additionally show me a proper way to fulfill this? In the real task, I will run loops for different time periods. Within each loop, I generate different values such as mean, median, and sum. (like sum1 and sum2 in the short sample) These values are given to the arrays (like a1 and a2) with a length already defined. By the way, I use JupyterLab to run python 3.