Showing 16 of 27 total issues
File __init__.py
has 464 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
r"""**proxTV** is a toolbox implementing blazing fast implementations of Total Variation proximity operators.
The library provides efficient solvers for the following Total Variation proximity problems:
**Standard (l1) Total Variation on a 1-dimensional signal**
Function tvp_2d
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def tvp_2d(x, w_col, w_row, p_col, p_row, n_threads=1, max_iters=0):
Function _condat_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _condat_tv2d(x, w, y, max_iters, info, **kwargs):
Function _chambollepock_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _chambollepock_tv2d(x, w, y, max_iters, info, **kwargs):
Function _chambollepockacc_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _chambollepockacc_tv2d(x, w, y, max_iters, info, **kwargs):
Function _condatchambollepock_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _condatchambollepock_tv2d(x, w, y, max_iters, info, **kwargs):
Function _kolmogorov_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _kolmogorov_tv2d(x, w, y, max_iters, info, **kwargs):
Function tvgen
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def tvgen(x, ws, ds, ps, n_threads=1, max_iters=0):
Function _pd_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _pd_tv2d(x, w, y, max_iters, info, **kwargs):
Function _yang_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _yang_tv2d(x, w, y, max_iters, info, **kwargs):
Function _dr_tv2d
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _dr_tv2d(x, w, y, max_iters, info, **kwargs):
Function tv1_1d
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def tv1_1d(x, w, method='hybridtautstring', sigma=0.05, maxbacktracks=None):
Function tv1_2d
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def tv1_2d(x, w, n_threads=1, max_iters=0, method='dr'):
Function tv1w_2d
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def tv1w_2d(x, w_col, w_row, max_iters=0, n_threads=1):
Function tvp_1d
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def tvp_1d(x, w, p, method='gpfw', max_iters=0):
Function test_tvp_1d
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
def test_tvp_1d():
"""Test that all 1D-lp-TV methods produce equivalent results"""
# Some of these methods are kind of unstable, so we ensure only that most
# of the times the results are similar
methods = ('gp', 'fw', 'gpfw')
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"