Skip to content

Commit

Permalink
added exceptions for E121 E126 and fixed PEP8 errors
Browse files Browse the repository at this point in the history
  • Loading branch information
sfarrens committed Mar 27, 2019
1 parent 691838f commit 7793ebe
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions modopt/opt/algorithms.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ def __init__(self, x, grad, prox_list, cost='auto', gamma_param=1.0,
self._x_old = np.copy(x)

# Set the algorithm operators
(self._check_operator(operator) for operator in [grad, cost]
+ prox_list)
(self._check_operator(operator) for operator in [grad, cost] +
prox_list)
self._grad = grad
self._prox_list = np.array(prox_list)
self._linear = linear
Expand Down Expand Up @@ -908,7 +908,7 @@ class Condat(SetUp):
"""

def __init__(self, x, y, grad, prox, prox_dual, linear=None, cost='auto',
reweight=None, rho=0.5, sigma=1.0, tau=1.0, rho_update=None,
reweight=None, rho=0.5, sigma=1.0, tau=1.0, rho_update=None,
sigma_update=None, tau_update=None, auto_iterate=True,
max_iter=150, n_rewightings=1, metric_call_period=5,
metrics={}):
Expand Down
2 changes: 1 addition & 1 deletion modopt/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_rotate_stack(self):
npt.assert_array_equal(np_adjust.rotate_stack(self.data2),
np.array([[[8, 7, 6], [5, 4, 3], [2, 1, 0]],
[[17, 16, 15], [14, 13, 12],
[11, 10, 9]]]),
[11, 10, 9]]]),
err_msg='Incorrect stack rotation')

def test_pad2d(self):
Expand Down
6 changes: 3 additions & 3 deletions modopt/tests/test_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,9 @@ def setUp(self):
[-0.21816724, -0.28316221],
[-0.28507434, -0.17275339],
[-0.35198144, -0.06234457],
[-0.41888854, 0.04806424],
[-0.48579564, 0.15847306],
[-0.55270274, 0.26888188]]),
[-0.41888854, 0.04806424],
[-0.48579564, 0.15847306],
[-0.55270274, 0.26888188]]),
np.array([42.23492742, 1.10041151]),
np.array([[-0.67608034, -0.73682791],
[0.73682791, -0.67608034]]))
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ description-file = README.rst
[tool:pytest]
addopts = --verbose --pep8 --cov=modopt
testpaths = modopt
pep8ignore = E402
pep8ignore = E121 E126 E402

0 comments on commit 7793ebe

Please sign in to comment.