Showing 153 of 6,500 total issues
Spreading
has 29 functions (exceeds 20 allowed). Consider refactoring. Open
class Spreading(object):
"""
Directional spreading function.
Parameters
Function mc2rfc
has a Cognitive Complexity of 32 (exceeds 15 allowed). Consider refactoring. Open
def mc2rfc(f_xy, paramv=None, paramu=None):
"""
MC2RFC Calculates a rainflow matrix given a Markov chain with kernel f_xy;
f_rfc = f_xy + F_mc(f_xy).
- 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 poly2str
has a Cognitive Complexity of 32 (exceeds 15 allowed). Consider refactoring. Open
def poly2str(p, variable='x'):
"""
Return polynomial as a string.
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 fit
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
def fit(self, y, X=None, theta0=None, beta0=None):
"""
Member variables
.df : degrees of freedom for error.
.params : estimated model parameters
Kalman
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class Kalman(object):
"""
Kalman filter object - updates a system state vector estimate based upon an
observation, using a discrete Kalman filter.
_CommonProfile
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class _CommonProfile:
def __init__(self, fit_dist, i=None, pmin=None, pmax=None, n=100, alpha=0.05, lmaxdiff=1e-5):
self.fit_dist = fit_dist
self.pmin = pmin
_KDE
has 25 functions (exceeds 20 allowed). Consider refactoring. Open
class _KDE(object):
def __init__(self, data, kernel=None, xmin=None, xmax=None):
self.dataset = data
self.xmin = xmin
frechet_r_gen
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class frechet_r_gen(weibull_min_gen):
"""A Frechet right (or Weibull minimum) continuous random variable.
%(before_notes)s
frechet_l_gen
has 23 functions (exceeds 20 allowed). Consider refactoring. Open
class frechet_l_gen(weibull_max_gen):
"""A Frechet left (or Weibull maximum) continuous random variable.
%(before_notes)s
Function poly2hstr
has a Cognitive Complexity of 28 (exceeds 15 allowed). Consider refactoring. Open
def poly2hstr(p, variable='x'):
"""
Return polynomial as a Horner represented string.
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
TransferFunction
has 22 functions (exceeds 20 allowed). Consider refactoring. Open
class TransferFunction(object):
'''
Class for computing transfer functions based on linear wave theory
of the system with input surface elevation,
Function sim_nl
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sim_nl(self, ns=None, cases=1, dt=None, iseed=None, method='random',
fnlimit=1.4142, reltol=1e-3, g=9.81, verbose=False,
output='timeseries'):
"""
Simulates a Randomized 2nd order non-linear wave X(t)
Function test_exp_zdcos2t_dcos2t_exp_jw_cos_t_b_dcos2t
has a Cognitive Complexity of 27 (exceeds 15 allowed). Consider refactoring. Open
def test_exp_zdcos2t_dcos2t_exp_jw_cos_t_b_dcos2t(self):
x1 = 20
y1 = 50
z1 = 10
beta = np.abs(np.arctan(y1/x1))
- 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 findoutliers
has a Cognitive Complexity of 27 (exceeds 15 allowed). Consider refactoring. Open
def findoutliers(x, zcrit=0.0, dcrit=None, ddcrit=None, verbose=False):
"""
Return indices to spurious points of data
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 fit
has a Cognitive Complexity of 27 (exceeds 15 allowed). Consider refactoring. Open
def fit(self, y, X=None, theta0=None, beta0=None):
"""
Member variables
.df : degrees of freedom for error.
.params : estimated model 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
Cheb1d
has 21 functions (exceeds 20 allowed). Consider refactoring. Open
class Cheb1d(object):
coeffs = None
order = None
a = None
b = None
Function simcond
has a Cognitive Complexity of 26 (exceeds 15 allowed). Consider refactoring. Open
def simcond(self, xo, method='approx', i_unknown=None):
"""
Simulate values conditionally on observed known values
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 sim
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def sim(self, ns, alpha):
"""
Simulates process with given irregularity factor and crossing spectrum
Parameters
Function test_rind
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
def test_rind():
Et = 0.001946 # exact prob.
n = 5
Blo = -np.inf
Function characteristic
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
def characteristic(self, fact='Hm0', T=1200, g=9.81):
"""
Returns spectral characteristics and their covariance
Parameters