Showing 153 of 6,500 total issues
Avoid too many return
statements within this function. Open
return ret
Avoid too many return
statements within this function. Open
return bvd(lower[0], -upper[1], -correl)
Avoid too many return
statements within this function. Open
return intg / np.abs(beta) / 2.
Avoid too many return
statements within this function. Open
return 1/(1+x**2)/np.pi
Avoid too many return
statements within this function. Open
return x
Avoid too many return
statements within this function. Open
return self._mom1_sc(n)
Avoid too many return
statements within this function. Open
return slx + tax - (sla + tab)
Avoid too many return
statements within this function. Open
return x
Avoid too many return
statements within this function. Open
return bvd(-upper[0], -upper[1], correl)
Avoid too many return
statements within this function. Open
return ret
Function accum
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def accum(accmap, a, func=None, shape=None, fill_value=0, dtype=None):
"""An accumulation function similar to Matlab's `accumarray` function.
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 findtp
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def findtp(x, h=0.0, kind=None, method='clib'):
'''
Return indices to turning points (tp) of data, optionally rainflow filtered.
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 _pdf_single_value_zolotarev
has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring. Open
def _pdf_single_value_zolotarev(x, alpha, beta):
"""Calculate pdf using Zolotarev's methods as detailed in [BS].
"""
zeta = -beta*np.tan(np.pi*alpha/2.)
if alpha != 1:
- 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"