def _non_dominated_front_merge_arr(iterable, key=lambda x: x, allowequality=True):
    items = list(iterable)
    l = len(items)
    if l > 100:
        part1 = list(_non_dominated_front_merge_arr(items[:l / 2], key, allowequality))
        part2 = list(_non_dominated_front_merge_arr(items[l / 2:], key, allowequality))
        if len(part1) >= l / 3 or len(part2) >= l / 3:
            return _non_dominated_front_arr(part1 + part2, key, allowequality)
        else:
            return _non_dominated_front_merge_arr(part1 + part2, key, allowequality)
    else:
        return _non_dominated_front_arr(items, key, allowequality)
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/nondominated.py/_non_dominated_front_merge_arr/original