Код: Выделить всё
k=2
elements = [i for i in np.arange(k)]
Sk = PermutationGroup([Permutation(list(perm)) for perm in itertools.permutations(elements)])
factorial = int(sp.special.factorial(k))
for i in np.arange(factorial):
trace_list = np.zeros(Sk[i].cycles)
...
Код: Выделить всё
k=2
elements = [i for i in np.arange(k)]
Sk = PermutationGroup([Permutation(list(perm)) for perm in itertools.permutations(elements)])
print(Sk)
Код: Выделить всё
PermutationGroup([(0 1)])Подробнее здесь: https://stackoverflow.com/questions/793 ... e-identity
Мобильная версия