Showing 153 of 6,500 total issues
File _continuous_distns.py
has 5642 lines of code (exceeds 1000 allowed). Consider refactoring. Open
# -*- coding: utf-8 -*-
#
# Author: Travis Oliphant 2002-2011 with contributions from
# SciPy Developers 2004-2011
#
File core.py
has 2966 lines of code (exceeds 1000 allowed). Consider refactoring. Open
import warnings
import os
import numpy as np
from numpy import (pi, inf, zeros, ones, where, nonzero,
flatnonzero, ceil, sqrt, exp, log, arctan2,
File misc.py
has 2355 lines of code (exceeds 1000 allowed). Consider refactoring. Open
'''
Misc
'''
try:
File polynomial.py
has 1993 lines of code (exceeds 1000 allowed). Consider refactoring. Open
"""
Extended functions to operate on polynomials
"""
# ------------------------------------------------------------------------
# Name: polynomial
Function _cov2mmtpdf
has a Cognitive Complexity of 165 (exceeds 15 allowed). Consider refactoring. Open
def _cov2mmtpdf(self, R, dt, u, def_nr, Nstart, hg, options):
'''
COV2MMTPDF Joint density of Maximum, minimum and period.
CALL [pdf, err, options] = cov2mmtpdf(R,dt,u,def,Nstart,hg,options)
- 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
File objects.py
has 1859 lines of code (exceeds 1000 allowed). Consider refactoring. Open
# Name: module1
# Purpose:
#
# Author: pab
#
File models.py
has 1719 lines of code (exceeds 1000 allowed). Consider refactoring. Open
#!/usr/bin/env python
"""
Models module
-------------
File estimation.py
has 1342 lines of code (exceeds 1000 allowed). Consider refactoring. Open
"""
Contains FitDistribution and Profile class, which are
important classes for fitting to various Continous and Discrete Probability
Distributions
Function moment
has a Cognitive Complexity of 67 (exceeds 15 allowed). Consider refactoring. Open
def moment(self, nr=2, vari='xt'):
'''
Calculates spectral moments 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 mctp2tc
has a Cognitive Complexity of 57 (exceeds 15 allowed). Consider refactoring. Open
def mctp2tc(f_Mm, utc, param, f_mM=None):
"""
MCTP2TC Calculates frequencies for the upcrossing troughs and crests
using Markov chain of turning points.
- 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 cdfnorm2d
has a Cognitive Complexity of 55 (exceeds 15 allowed). Consider refactoring. Open
def cdfnorm2d(b1, b2, r):
"""
Returnc Bivariate Normal cumulative distribution 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
File core.py
has 1165 lines of code (exceeds 1000 allowed). Consider refactoring. Open
import warnings
from wafo.containers import PlotData
from wafo.misc import findextrema
from scipy import special
import numpy as np
Function _make_findrfc
has a Cognitive Complexity of 49 (exceeds 15 allowed). Consider refactoring. Open
def _make_findrfc(cmp1, cmp2):
@jit(int64(int64[:], float64[:], float64), nopython=True)
def local_findrfc(t, y, h):
"""Returns indices, t, to RFC turningpoints of a vector y of turningpoints
- 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 to_mmt_pdf
has a Cognitive Complexity of 46 (exceeds 15 allowed). Consider refactoring. Open
def to_mmt_pdf(self, paramt=None, paramu=None, utc=None, kind='mm',
verbose=False, **options):
''' Returns joint density of Maximum, minimum and period.
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 _rvs_scalar
has a Cognitive Complexity of 42 (exceeds 15 allowed). Consider refactoring. Open
def _rvs_scalar(self, p, b, numsamples=None):
# following [2], the quasi-pdf is used instead of the pdf for the
# generation of rvs
invert_res = False
if not(numsamples):
- 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 _findrfc
has a Cognitive Complexity of 41 (exceeds 15 allowed). Consider refactoring. Open
def _findrfc(ind, y, h):
"""Returns indices to RFC turningpoints of a vector y of turningpoints
Notes
-----
- 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
File integrate.py
has 1092 lines of code (exceeds 1000 allowed). Consider refactoring. Open
import warnings
import numpy as np
from numpy import pi, sqrt, ones, zeros
from scipy import integrate as intg
import scipy.special.orthogonal as ort
FitDistribution
has 33 functions (exceeds 20 allowed). Consider refactoring. Open
class FitDistribution(rv_frozen):
"""
Return estimators to shape, location, and scale from data
Starting points for the fit are given by input arguments. For any
SpecData1D
has 32 functions (exceeds 20 allowed). Consider refactoring. Open
class SpecData1D(PlotData):
"""
Container class for 1D spectrum data objects in WAFO
Function mctp2rfc
has a Cognitive Complexity of 35 (exceeds 15 allowed). Consider refactoring. Open
def mctp2rfc(fmM, fMm=None):
"""
Return Rainflow matrix given a Markov chain of turning points
computes f_rfc = f_mM + F_mct(f_mM).
- 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"