path = []
for iteration in range(len(input_sets) - 1):
iteration_results = []
comb_iter = zip(*np.triu_indices(len(input_sets), 1))
for positions in comb_iter:
contract = _find_contraction(positions, input_sets, output_set)
idx_result, new_input_sets, idx_removed, idx_contract = contract
After Change
for iteration in range(len(input_sets) - 1):
iteration_results = []
comb_iter = []
for x in range(len(input_sets)):
for y in range(x + 1, len(input_sets)):
comb_iter.append((x,y))
for positions in comb_iter: