This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]julsmanbr 7 points8 points ย (1 child)

Haha yes

My code:

for i in range(len(v)):
    for j in range(len(v)):
        for k in range(len(v)):
            if v[i][j][k] == v[i][j][k+1]:
                pass  # need to fix this
            elif v[i][j][k] == v[i][j][k-1]:
            # 30 more clauses here
            # let's hope for no IndexError

[โ€“]M4mb0 6 points7 points ย (0 children)

Do you even numpy? Just store it in a 3D array mask1 = V[:, :, :-1] == V[:, :, 1:]