Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
your code is having a few errors, you are iterating same number multiple times so incrementing and decrementing the same number multiple times. Here is the corrected version, replace 20 to 38 lines in your code with this: for i in range(beb.shape[0]): for j in range(beb.shape[1]): if (not beb[i][j] and mask[i,j]) or (beb[i][j] and not mask[i,j]): if not copiv[i,j,1] % 2: copiv[i,j,1] += 1 else: copiv[i,j,1] -= 1 let me know if there is any further doubt in the above code.
30th May 2020, 11:16 PM
fork()
fork() - avatar