Code Duplication    Length = 27-27 lines in 2 locations

tests/ParticleSwarm.py 1 location

@@ 39-65 (lines=27) @@
36
    _base_test(opt, init_positions)
37
38
39
def test_individuals():
40
    for init_positions in [
41
        [np.array([0])],
42
        [np.array([0]), np.array([0])],
43
        [np.array([0]), np.array([0])],
44
        [
45
            np.array([0]),
46
            np.array([0]),
47
            np.array([0]),
48
            np.array([0]),
49
            np.array([0]),
50
            np.array([0]),
51
            np.array([0]),
52
            np.array([0]),
53
            np.array([0]),
54
            np.array([0]),
55
            np.array([0]),
56
            np.array([0]),
57
            np.array([0]),
58
            np.array([0]),
59
            np.array([0]),
60
            np.array([0]),
61
            np.array([0]),
62
            np.array([0]),
63
        ],
64
    ]:
65
        _test_ParticleSwarmOptimizer(init_positions)
66
67
68
def test_inertia():

tests/EvolutionStrategy.py 1 location

@@ 39-65 (lines=27) @@
36
    _base_test(opt, init_positions)
37
38
39
def test_individuals():
40
    for init_positions in [
41
        [np.array([0])],
42
        [np.array([0]), np.array([0])],
43
        [np.array([0]), np.array([0])],
44
        [
45
            np.array([0]),
46
            np.array([0]),
47
            np.array([0]),
48
            np.array([0]),
49
            np.array([0]),
50
            np.array([0]),
51
            np.array([0]),
52
            np.array([0]),
53
            np.array([0]),
54
            np.array([0]),
55
            np.array([0]),
56
            np.array([0]),
57
            np.array([0]),
58
            np.array([0]),
59
            np.array([0]),
60
            np.array([0]),
61
            np.array([0]),
62
            np.array([0]),
63
        ],
64
    ]:
65
        _test_EvolutionStrategyOptimizer(init_positions)
66
67
68
def test_mutation_rate():