Jan-22-2022, 12:41 AM
(Jan-21-2022, 10:02 AM)ThiefOfTime Wrote: ah ok, i see. the problem is that you are iterating over lists that you alread modified. If I would guess I would say it is this part:
if (rho_final[row][column]==rho[row][column]): print('hey') # i would leave this part as it is, as it is the fastest way to savely do what you are trying to do. also values that are succesfully found in both lists can be overwritten rho[row][column]=m rho_final[row][column]=mwell to be more specific the if case. You could try changing it to something like this:
if (not type(rho_final[row][column]) == list and rho_final[row][column]==rho[row][column]): print('hey') # i would leave this part as it is, as it is the fastest way to savely do what you are trying to do. also values that are succesfully found in both lists can be overwritten rho[row][column]=m rho_final[row][column]=mtry playing around with it. the problem you are currently having is definately in that par. The
i, j = np.where(rho_final_arr == rho[row][column])worked for me even when there were lists already present, so I am guessing that this line is the problem
Hello,
I am trying to all possible combination of if and still struggling with the same problem ://. I will try a few more tricks and will tell you