In the following code, there is no reason I can see why variable "cleary" would change value, but it does. I have restarted pyCharm multiple times but it keeps happening.
import numpy as np
nPeriods = 48
nGens = 1
cleary = np.zeros((nPeriods,nGens,2))
clearz = np.zeros((nPeriods,nGens))
for ii in range(nPeriods):
for jj in range(nGens):
temp = cleary
temp[ii,jj,:] = 1
What am I doing wrong?