Showing 13 of 591 total issues
Bicomplex
has 68 functions (exceeds 20 allowed). Consider refactoring. Open
class Bicomplex(object):
"""
BICOMPLEX(z1, z2)
LogRule
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class LogRule(object):
"""Log spaced finite difference rule class
Parameters
----------
Function _dea
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def _dea(self, epstab, n):
res3la = epstab[-3:]
nres = self._nres
- 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"
Further reading
Function run_all_benchmarks
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def run_all_benchmarks(method='forward', order=4, x_values=(0.1, 0.5, 1.0, 5), n_max=11,
show_plot=True):
epsilon = MinStepGenerator(base_step=None, scale=None, step_nom=None, num_extrap=0)
- 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"
Further reading
Function _check_convergence
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def _check_convergence(self, i, z0, r, m, bn):
if self._direction_changes > 1 or self._degenerate:
self._num_changes += 1
if self._num_changes >= 1 + self.num_extrap:
return True, r
- 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"
Further reading
Function __init__
has 9 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, base_step=2.0, step_ratio=None, num_steps=15,
Function __call__
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def __call__(self, s_n):
epstab = self.epstab
n = len(epstab)
epstab.append(s_n)
- 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"
Further reading
Function main
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def main():
x = 0.5
methods = ['complex', 'central', 'backward', 'forward']
# for i, derivative in enumerate([nd.Derivative, nds.Gradient, nda.Derivative]):
- 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"
Further reading
Function __init__
has 9 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, base_step=None, step_ratio=None, num_steps=None, step_nom=None,
Function approx_fprime
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def approx_fprime(x, f, epsilon=None, args=(), kwargs=None, centered=True):
"""
Gradient of function, or Jacobian if function fun returns 1d array
Parameters
- 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"
Further reading
Function _compute_benchmark
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def _compute_benchmark(functions, problem_sizes):
result_list = []
for n in problem_sizes:
print('n=', n)
num_methods = len(functions)
- 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"
Further reading
Function build_main
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def build_main(version):
"""Build and update {} version, documentation and package.
The script remove the previous built binaries and generated documentation
before it generate the documentation and build the binaries
- 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"
Further reading
Function do_profile
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def do_profile(follow=(), follow_all_methods=False):
"""
Decorator to profile a function or class method
It uses line_profiler to give detailed reports on time spent on each
- 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"