wafo-project/pywafo

View on GitHub

Showing 153 of 6,500 total issues

Avoid too many return statements within this function.
Open

        return ret
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], -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 intg / np.abs(beta) / 2.
      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 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 x
          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 slx + tax - (sla + tab)
              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 x
                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 ret
                    Severity: Major
                    Found in src/wafo/stats/_continuous_distns.py - About 30 mins to fix

                      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
                          ----------
                      Severity: Minor
                      Found in src/wafo/kdetools/gridding.py - About 25 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

                      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
                      Severity: Minor
                      Found in src/wafo/misc.py - About 25 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

                      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:
                      Severity: Minor
                      Found in src/wafo/stats/_continuous_distns.py - About 25 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

                      Severity
                      Category
                      Status
                      Source
                      Language