I stumbled today upon this issue and I cannot see what's the problem:
print(np.unique(label))
>>> [0. 1. 2. 3. 4.]
LAC = label
print(np.unique(LAC))
>>> [0. 1. 2. 3. 4.]
print(np.unique(label))
>>> [0. 1. 2. 3. 4.]
LAC[LAC != 4] = 0
LAC[LAC == 4] = 1
print(np.unique(LAC))
>>> [0. 1.]
print(np.unique(label))
>>> [0. 1.]
Is it somethings I do wrong ? label
is a numpy array (44,640,640)
and LAC
is just supposed to be the copy of label
but for some reason it gets affected too ?
I don't understand where this comes from. Does anyone have an idea ?