Skip to content

Commit

Permalink
fix bug in doc
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigo-pena committed Jun 26, 2017
1 parent 3a37e7c commit eb445bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyunlocbox/acceleration.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ class regularized_nonlinear(dummy):
>>> params = {'rtol':0, 'maxit':200, 'verbosity':'NONE'}
>>> ret = solvers.solve([f, fd], x0, solver, **params)
>>> pctdiff = 100*np.sum((xstar - ret['sol'])**2)/np.sum(xstar**2)
>>> print('Difference: {0:.2f}%'.format(pctdiff))
Difference: 1.32%
>>> print('Difference: {0:.1f}%'.format(pctdiff))
Difference: 1.3%
"""

Expand Down
4 changes: 2 additions & 2 deletions pyunlocbox/solvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ class gradient_descent(solver):
>>> params = {'rtol':0, 'maxit':14000, 'verbosity':'NONE'}
>>> ret = solvers.solve([f, fd], x0, solver, **params)
>>> pctdiff = 100*np.sum((xstar - ret['sol'])**2)/np.sum(xstar**2)
>>> print('Difference: {0:.2f}%'.format(pctdiff))
Difference: 1.32%
>>> print('Difference: {0:.1f}%'.format(pctdiff))
Difference: 1.3%
"""

Expand Down

0 comments on commit eb445bb

Please sign in to comment.