Skip to content

Commit

Permalink
Update _py_algorithms.py
Browse files Browse the repository at this point in the history
Added brackets to certain instructions to make sure doctest is able to process the ellipses (namely leading ones) as intended.
  • Loading branch information
thisandthatuser authored Sep 5, 2024
1 parent 6ec3e9b commit aa5dcc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygmo/_py_algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class scipy_optimize:
>>> import pygmo as pg
>>> prob = pg.problem(pg.rosenbrock(10))
>>> pop = pg.population(prob=prob, size=1, seed=0)
>>> pop.champion_f[0] # doctest: +ELLIPSIS
>>> [pop.champion_f[0]] # doctest: +ELLIPSIS
...929975.7994682974...
>>> scp = pg.algorithm(pg.scipy_optimize(method="L-BFGS-B"))
>>> result = scp.evolve(pop).champion_f
>>> result[0] # doctest: +ELLIPSIS
>>> [result[0]] # doctest: +ELLIPSIS
...1.1377...
>>> pop.problem.get_fevals()
55
Expand Down

0 comments on commit aa5dcc4

Please sign in to comment.