-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
def permute_idices(wires):
# This function takes an array "circuit" of arbitrary values and returns an
# array with shuffles the indices of "circuit" for repeating values
size = len(wires)
permutation = [i + 1 for i in range(size)]
for i in range(size):
for j in range(i + 1, size):
if wires[i] == wires[j]:
permutation[i], permutation[j] = permutation[j], permutation[i]
break
return permutationLooks like the return should be unindented.
Metadata
Metadata
Assignees
Labels
No labels