@crossover
def partially_matched_crossover(random, mom, dad, args):
    crossover_rate = args.setdefault('crossover_rate', 1.0)
    if random.random() < crossover_rate:
        size = len(mom)
        points = random.sample(range(size), 2)
        x, y = min(points), max(points)
        bro = copy.copy(dad)
        bro[x:y+1] = mom[x:y+1]
        sis = copy.copy(mom)
        sis[x:y+1] = dad[x:y+1]
        for parent, child in zip([dad, mom], [bro, sis]):
            for i in range(x, y+1):
                if parent[i] not in child[x:y+1]:
                    spot = i
                    while x <= spot <= y:
                        spot = parent.index(child[spot])
                    child[spot] = parent[i]
        return [bro, sis]
    else:
        return [mom, dad]
set up our attributes for standalone mode operation.
dataset/ETHPy150Open aarongarrett/inspyred/inspyred/ec/variators/crossovers.py/partially_matched_crossover--crossover with--dataset/ETHPy150Open scanner/asimap/utils/index_all_mboxs.py/TempOptions.__init__