Skip to content

Commit

Permalink
Fix basic optimization example unknown arguments issues (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Zhang authored and ljvmiranda921 committed Apr 25, 2019
1 parent a04b7e5 commit 90275e6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/examples/basic_optimization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ several variables at once.
optimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=2, options=options)
# Perform optimization
cost, pos = optimizer.optimize(fx.sphere, print_step=100, iters=1000, verbose=3)
cost, pos = optimizer.optimize(fx.sphere, iters=1000)
.. parsed-literal::
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/inverse_kinematics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ Braced with these preparations we can finally start using the algorithm:
bounds=constraints)
# Perform optimization
cost, joint_vars = optimizer.optimize(opt_func, print_step=100, iters=1000, verbose=3)
cost, joint_vars = optimizer.optimize(opt_func, iters=1000)
.. parsed-literal::
Expand Down
9 changes: 1 addition & 8 deletions examples/basic_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -121,14 +121,7 @@
"optimizer = ps.single.GlobalBestPSO(n_particles=10, dimensions=2, options=options)\n",
"\n",
"# Perform optimization\n",
"cost, pos = optimizer.optimize(fx.sphere, print_step=100, iters=1000, verbose=3)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can see that the optimizer was able to find a good minima as shown above. You can control the verbosity of the output using the `verbose` argument, and the number of steps to be printed out using the `print_step` argument."
"cost, pos = optimizer.optimize(fx.sphere, iters=1000)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion examples/inverse_kinematics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@
" bounds=constraints)\n",
"\n",
"# Perform optimization\n",
"cost, joint_vars = optimizer.optimize(opt_func, print_step=100, iters=1000, verbose=3)"
"cost, joint_vars = optimizer.optimize(opt_func, iters=1000)"
]
},
{
Expand Down

0 comments on commit 90275e6

Please sign in to comment.