for k in range(0, popSiz):
for i in range(0, mn1[0]):
for j in range(0,mn1[1]):
theta1[i][j] = random.gauss(0, 1)
for i in range(0, mn2[0]):
for j in range(0,mn2[1]):
theta2[i][j] = random.gauss(0, 1)
GameLogic.globalDict["theta1-" + str(k)] = theta1
GameLogic.globalDict["theta2-" + str(k)] = theta2
theta1 = [[0 for x in range(mn1[1])] for y in range(mn1[0])] # this
theta2 = [[0 for x in range(mn2[1])] for y in range(mn2[0])] # and this
print(GameLogic.globalDict["theta1-0"]==GameLogic.globalDict["theta1-1"])
最後の2行(ここでは# this
# and this
)にコメントすると、.globalDict["theta1-" + str(k)]
はすべて同じになります。したがって、コメントの場合はtrueを、そうでない場合はfalseを出力します。私はなぜそれが疑問ですか?私はそれの論理を得ていない。なぜPythonはゼロ以外の配列を覆っていませんか?
あなたのタイトルに_Override_または_Overwrite_を意味しますか? –