wafo-project/pywafo

View on GitHub

Showing 153 of 6,500 total issues

Function cltext has 8 arguments (exceeds 7 allowed). Consider refactoring.
Open

def cltext(levels, percent=False, n=4, xs=0.036, ys=0.94, zs=0, figure=None,
Severity: Major
Found in src/wafo/graphutil.py - About 35 mins to fix

    Function _a_levin has 8 arguments (exceeds 7 allowed). Consider refactoring.
    Open

        def _a_levin(omega, f, g, d_g, x, s, basis, *args, **kwds):
    Severity: Major
    Found in src/wafo/integrate_oscillating.py - About 35 mins to fix

      Function interp3 has 8 arguments (exceeds 7 allowed). Consider refactoring.
      Open

      def interp3(x, y, z, v, xi, yi, zi, method='cubic'):
      Severity: Major
      Found in src/wafo/interpolate.py - About 35 mins to fix

        Function smoothn has 8 arguments (exceeds 7 allowed). Consider refactoring.
        Open

        def smoothn(data, s=None, weight=None, robust=False, z0=None, tolz=1e-3,
        Severity: Major
        Found in src/wafo/sg_filter/_core.py - About 35 mins to fix

          Function __call__ has 8 arguments (exceeds 7 allowed). Consider refactoring.
          Open

              def __call__(self, cov, m, ab, bb, indI=None, xc=None, nt=None, **kwds):
          Severity: Major
          Found in src/wafo/gaussian.py - About 35 mins to fix

            Function prbnormtndpc has 8 arguments (exceeds 7 allowed). Consider refactoring.
            Open

            def prbnormtndpc(rho, a, b, d=None, df=0, abseps=1e-4, ierc=0, hnc=0.24):
            Severity: Major
            Found in src/wafo/gaussian.py - About 35 mins to fix

              Function __init__ has 8 arguments (exceeds 7 allowed). Consider refactoring.
              Open

                  def __init__(self, fit_dist, x, i=None, pmin=None, pmax=None, n=100,
              Severity: Major
              Found in src/wafo/stats/estimation.py - About 35 mins to fix

                Function __init__ has 8 arguments (exceeds 7 allowed). Consider refactoring.
                Open

                    def __init__(self, y, z0, weightstr, weights, s, robust, maxiter, tolz):
                Severity: Major
                Found in src/wafo/sg_filter/_core.py - About 35 mins to fix

                  Function _cdf_single_value_zolotarev has a Cognitive Complexity of 17 (exceeds 15 allowed). Consider refactoring.
                  Open

                      def _cdf_single_value_zolotarev(x, alpha, beta):
                          """Calculate cdf using Zolotarev's methods as detailed in [BS].
                          """
                          zeta = -beta*np.tan(np.pi*alpha/2.)
                          if alpha != 1:
                  Severity: Minor
                  Found in src/wafo/stats/_continuous_distns.py - About 35 mins to fix

                  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

                  Avoid too many return statements within this function.
                  Open

                                  return 1/(1+x**2)/np.pi
                  Severity: Major
                  Found in src/wafo/stats/_continuous_distns.py - About 30 mins to fix

                    Avoid too many return statements within this function.
                    Open

                            return (bvd(-upper[0], -upper[1], correl) -
                    Severity: Major
                    Found in src/wafo/gaussian.py - About 30 mins to fix

                      Avoid too many return statements within this function.
                      Open

                                      return .5 + np.arctan(x)/np.pi
                      Severity: Major
                      Found in src/wafo/stats/_continuous_distns.py - About 30 mins to fix

                        Avoid too many return statements within this function.
                        Open

                                    return self._mom1_sc(n)
                        Severity: Major
                        Found in src/wafo/stats/_continuous_distns.py - About 30 mins to fix

                          Avoid too many return statements within this function.
                          Open

                                  return (bvd(lower[0], lower[1], correl) -
                          Severity: Major
                          Found in src/wafo/gaussian.py - About 30 mins to fix

                            Avoid too many return statements within this function.
                            Open

                                    return bvd(-upper[0], lower[1], -correl)
                            Severity: Major
                            Found in src/wafo/gaussian.py - About 30 mins to fix

                              Avoid too many return statements within this function.
                              Open

                                  return 1
                              Severity: Major
                              Found in src/wafo/gaussian.py - About 30 mins to fix

                                Avoid too many return statements within this function.
                                Open

                                        return bvd(-upper[0], -upper[1], correl)
                                Severity: Major
                                Found in src/wafo/gaussian.py - About 30 mins to fix

                                  Avoid too many return statements within this function.
                                  Open

                                          return bvd(lower[0], lower[1], correl)
                                  Severity: Major
                                  Found in src/wafo/gaussian.py - About 30 mins to fix

                                    Avoid too many return statements within this function.
                                    Open

                                                    return 1 - levy_stable_gen._cdf_single_value_zolotarev(-x, 1, -beta)
                                    Severity: Major
                                    Found in src/wafo/stats/_continuous_distns.py - About 30 mins to fix

                                      Avoid too many return statements within this function.
                                      Open

                                                          return intg / np.abs(beta) / 2.
                                      Severity: Major
                                      Found in src/wafo/stats/_continuous_distns.py - About 30 mins to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language