Showing 153 of 6,500 total issues
Function __init__
has 11 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, type='cos-2s', theta0=0, # @ReservedAssignment
Function __init__
has 11 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=15,
Function __call__
has 11 arguments (exceeds 7 allowed). Consider refactoring. Open
def __call__(self, fun, a, b, releps=1e-3, abseps=1e-3, alpha=0, beta=0,
Consider simplifying this complex logical expression. Open
if (((z0 == +1) and cmp1(yi, fmi))
or ((z0 == -1) and cmp2(yi, fpi))):
z1 = -1
elif (((z0 == +1) and cmp2(fmi, yi)) or
((z0 == -1) and cmp1(fpi, yi))):
Function sim
has a Cognitive Complexity of 19 (exceeds 15 allowed). Consider refactoring. Open
def sim(self, ns=None, cases=1, dt=None, iseed=None, method='random',
derivative=False):
''' Simulates a Gaussian process and its derivative from spectrum
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 prbnorm2d
has a Cognitive Complexity of 19 (exceeds 15 allowed). Consider refactoring. Open
def prbnorm2d(a, b, r):
"""
Returns Bivariate Normal probability
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 _findrfc5_astm
has a Cognitive Complexity of 19 (exceeds 15 allowed). Consider refactoring. Open
def _findrfc5_astm(array_ext, array_t, a, t, array_out):
"""
Rain flow with time analysis
returns
- 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 _findrfc3_astm
has a Cognitive Complexity of 19 (exceeds 15 allowed). Consider refactoring. Open
def _findrfc3_astm(array_ext, a, array_out):
"""
Rain flow without time analysis
Return [ampl ampl_mean nr_of_cycle]
- 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 10 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=1,
Function sim_nl
has 10 arguments (exceeds 7 allowed). Consider refactoring. Open
def sim_nl(self, ns=None, cases=1, dt=None, iseed=None, method='random',
Function __init__
has 10 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, data, y, p=0, hs=None, kernel=None, alpha=0.0,
Function dispersion_idx
has 10 arguments (exceeds 7 allowed). Consider refactoring. Open
def dispersion_idx(
Function __init__
has 10 arguments (exceeds 7 allowed). Consider refactoring. Open
def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=8,
Function disufq
has 10 arguments (exceeds 7 allowed). Consider refactoring. Open
def disufq(rA, iA, w, kw, h, g, nmin, nmax, m, n):
Avoid deeply nested control flow statements. Open
if (Nx == 1): # % THEN
# Joint density of (TMd,TMm),(Tdm,TMm) given
# the max and the min.
# Note that the density is not scaled to unity
pdf[0, ts, tn] = fxind[0] # %*CC
Avoid deeply nested control flow statements. Open
if (row) * nh + col < nfigspertile:
if idx < nfigs:
figlft = int(
screenpos[0] + (col + 1) * hspc + col * figwid)
fighnd = wnds[idx]
Avoid deeply nested control flow statements. Open
if norm != 0:
PmM[j, :] = PmM[j, :] / norm
e[j] = e[j] / norm
# end
# end
Avoid deeply nested control flow statements. Open
for i in range(1, Nx1):
J = IJ + Nx1
pdf[1:Nx1, i, 0] += fxind[IJ:J].T * dt # *CC
err[1:Nx1, i, 0] += err0[IJ:J].T * dt2
terr[1:Nx1, i, 0] += terr0[IJ:J].T * dt
Avoid deeply nested control flow statements. Open
if normA[j] != 0:
AA[j, :] = AA[j, :] / normA[j]
e[j] = e[j] / normA[j]
# end if
# end for
Avoid deeply nested control flow statements. Open
if nA == 1:
fx = NN / (1 - AA) * e
else:
# TODO CHECK this
fx = NN * np.linalg.solve((I - AA), e)[0] # (I-AA)\e