wafo-project/pywafo

View on GitHub
src/wafo/gaussian.py

Summary

Maintainability
F
3 wks
Test Coverage

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
Severity: Minor
Found in src/wafo/gaussian.py - About 6 hrs 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

Cyclomatic complexity is too high in function cdfnorm2d. (21)
Open

def cdfnorm2d(b1, b2, r):
    """
    Returnc Bivariate Normal cumulative distribution function

    Parameters
Severity: Minor
Found in src/wafo/gaussian.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in function prbnorm2d. (20)
Open

def prbnorm2d(a, b, r):
    """
    Returns Bivariate Normal probability

    Parameters
Severity: Minor
Found in src/wafo/gaussian.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in method initialize. (10)
Open

    def initialize(self, speed=None):
        """
        Initializes member variables according to speed.

        Parameter
Severity: Minor
Found in src/wafo/gaussian.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in method __call__. (7)
Open

    def __call__(self, cov, m, ab, bb, indI=None, xc=None, nt=None, **kwds):
        if any(kwds):
            self.__dict__.update(**kwds)
            self.set_constants()
        if xc is None:
Severity: Minor
Found in src/wafo/gaussian.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Cyclomatic complexity is too high in function prbnormnd. (6)
Open

def prbnormnd(correl, a, b, abseps=1e-4, releps=1e-3, maxpts=None, method=0):
    """
    Multivariate Normal probability by Genz' algorithm.


Severity: Minor
Found in src/wafo/gaussian.py by radon

Cyclomatic Complexity

Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

Construct Effect on CC Reasoning
if +1 An if statement is a single decision.
elif +1 The elif statement adds another decision.
else +0 The else statement does not cause a new decision. The decision is at the if.
for +1 There is a decision at the start of the loop.
while +1 There is a decision at the while statement.
except +1 Each except branch adds a new conditional path of execution.
finally +0 The finally block is unconditionally executed.
with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
assert +1 The assert statement internally roughly equals a conditional statement.
Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

Source: http://radon.readthedocs.org/en/latest/intro.html

Consider simplifying this complex logical expression.
Open

    if np.all(infin == 2):
        return (bvd(lower[0], lower[1], correl) -
                bvd(upper[0], lower[1], correl) -
                bvd(lower[0], upper[1], correl) +
                bvd(upper[0], upper[1], correl))
Severity: Critical
Found in src/wafo/gaussian.py - About 1 hr to fix

    Function prbnorm2d has a Cognitive Complexity of 19 (exceeds 15 allowed). Consider refactoring.
    Open

    def prbnorm2d(a, b, r):
        """
        Returns Bivariate Normal probability
    
        Parameters
    Severity: Minor
    Found in src/wafo/gaussian.py - About 55 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 deeply nested control flow statements.
    Open

                        if len(k6) > 0:
                            k136 = k13[k6]
                            bvn[k136] += (a[k6] * _W20[i] * exp(asr[k6]) *
                                          (exp(-hk[k136] * (1 - rs[k6]) /
                                               (2 * (1 + rs[k6]))) / rs[k6] -
    Severity: Major
    Found in src/wafo/gaussian.py - About 45 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 __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

          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(-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 (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(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 bvd(-upper[0], -upper[1], correl)
                        Severity: Major
                        Found in src/wafo/gaussian.py - About 30 mins to fix

                          Refactor this function to reduce its Cognitive Complexity from 55 to the 15 allowed.
                          Open

                          def cdfnorm2d(b1, b2, r):
                          Severity: Critical
                          Found in src/wafo/gaussian.py by sonar-python

                          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                          See

                          Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.
                          Open

                          def prbnorm2d(a, b, r):
                          Severity: Critical
                          Found in src/wafo/gaussian.py by sonar-python

                          Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                          See

                          Function "prbnormtndpc" has 8 parameters, which is greater than the 7 authorized.
                          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 by sonar-python

                          A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                          Noncompliant Code Example

                          With a maximum number of 4 parameters:

                          def do_something(param1, param2, param3, param4, param5):
                              ...
                          

                          Compliant Solution

                          def do_something(param1, param2, param3, param4):
                              ...
                          

                          Method "__call__" has 9 parameters, which is greater than the 7 authorized.
                          Open

                              def __call__(self, cov, m, ab, bb, indI=None, xc=None, nt=None, **kwds):
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                          Noncompliant Code Example

                          With a maximum number of 4 parameters:

                          def do_something(param1, param2, param3, param4, param5):
                              ...
                          

                          Compliant Solution

                          def do_something(param1, param2, param3, param4):
                              ...
                          

                          Remove this commented out code.
                          Open

                                      # self.abseps  = max(self.abseps- truncError,0);
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          Programmers should not comment out code as it bloats programs and reduces readability.

                          Unused code should be deleted and can be retrieved from source control history if required.

                          See

                          • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                          • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                          • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                          • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                          Remove this commented out code.
                          Open

                              # A = np.repeat(Blo, n)
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          Programmers should not comment out code as it bloats programs and reduces readability.

                          Unused code should be deleted and can be retrieved from source control history if required.

                          See

                          • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                          • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                          • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                          • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                          Remove this commented out code.
                          Open

                                          #               b = sqrt(bs);
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          Programmers should not comment out code as it bloats programs and reduces readability.

                          Unused code should be deleted and can be retrieved from source control history if required.

                          See

                          • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                          • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                          • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                          • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                          Remove this commented out code.
                          Open

                          # if __name__ == '__main__':
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          Programmers should not comment out code as it bloats programs and reduces readability.

                          Unused code should be deleted and can be retrieved from source control history if required.

                          See

                          • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                          • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                          • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                          • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                          Either merge this branch with the identical one on line "271" or change one of the implementations.
                          Open

                                      self.abseps = 1e-2
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

                          Noncompliant Code Example

                          if 0 <= a < 10:
                              do_the_thing()
                          elif 10 <= a < 20:
                              do_the_other_thing()
                          elif 20 <= a < 50:
                              do_the_thing()  # Noncompliant; duplicates first condition
                          else:
                              do_the_rest()
                          
                          b = 4 if a > 12 else 4
                          

                          Compliant Solution

                          if (0 <= a < 10) or (20 <= a < 50):
                              do_the_thing()
                          elif 10 <= a < 20:
                              do_the_other_thing()
                          else:
                              do_the_rest()
                          
                          b = 4
                          

                          or

                          if 0 <= a < 10:
                              do_the_thing()
                          elif 10 <= a < 20:
                              do_the_other_thing()
                          elif 20 <= a < 50:
                              do_the_third_thing()
                          else:
                              do_the_rest()
                          
                          b = 8 if a > 12 else 4
                          

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if len(k1) > 0:
                                      k01 = k0[k1]
                                      for i in range(6):
                                          for sign in - 1, 1:
                                              sn = sin(asr[k1] * (sign * _X12[i] + 1) / 2)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 1 day to fix
                          src/wafo/gaussian.py on lines 862..868
                          src/wafo/gaussian.py on lines 880..886

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 170.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if len(k1) > 0:
                                      k01 = k0[k1]
                                      for i in range(10):
                                          for sign in - 1, 1:
                                              sn = sin(asr[k1] * (sign * _X20[i] + 1) / 2)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 1 day to fix
                          src/wafo/gaussian.py on lines 871..877
                          src/wafo/gaussian.py on lines 880..886

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 170.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if len(k1) > 0:
                                      k01 = k0[k1]
                                      for i in range(3):
                                          for sign in - 1, 1:
                                              sn = sin(asr[k1] * (sign * _X6[i] + 1) / 2)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 1 day to fix
                          src/wafo/gaussian.py on lines 862..868
                          src/wafo/gaussian.py on lines 871..877

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 170.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              Blo[0, ind] = maximum(Blo[0, ind], -infinity * dev[indI[ind + 1]])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 4 hrs to fix
                          src/wafo/gaussian.py on lines 363..363

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 56.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  b_lo[0, ind] = maximum(b_lo[0, ind], -infinity * dev[indI[ind + 1]])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 4 hrs to fix
                          src/wafo/gaussian.py on lines 395..395

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 56.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  b_up[0, ind] = minimum(b_up[0, ind], infinity * dev[indI[ind + 1]])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 4 hrs to fix
                          src/wafo/gaussian.py on lines 394..394

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 52.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              Bup[0, ind] = minimum(Bup[0, ind], infinity * dev[indI[ind + 1]])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 4 hrs to fix
                          src/wafo/gaussian.py on lines 362..362

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 52.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      asr = -(bs / a2 + hk[k13]) / 2.e0
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 929..929

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 33.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                              asr = -(bs / xs + hk[k13]) / 2
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 908..908

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 33.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                              (1 - c[k5] * bs[k5] * (1 - d[k5] * bs[k5] / 5) / 3)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 912..913

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 31.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                                          (1 - c[k4] * (bs[k4] - a2[k4]) *
                                                           (1 - d[k4] * bs[k4] / 5) / 3 +
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 922..922

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 31.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 1 and infin[1] == 1):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 0 and infin[1] == 2):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1022..1022
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 2 and infin[1] == 1):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1022..1022
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 1 and infin[1] == 2):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1022..1022
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 0 and infin[1] == 1):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1022..1022
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 2 and infin[1] == 0):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1022..1022
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 1 and infin[1] == 0):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1022..1022
                          src/wafo/gaussian.py on lines 1024..1024

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                              elif (infin[0] == 0 and infin[1] == 0):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 2 hrs to fix
                          src/wafo/gaussian.py on lines 1006..1006
                          src/wafo/gaussian.py on lines 1009..1009
                          src/wafo/gaussian.py on lines 1012..1012
                          src/wafo/gaussian.py on lines 1015..1015
                          src/wafo/gaussian.py on lines 1018..1018
                          src/wafo/gaussian.py on lines 1020..1020
                          src/wafo/gaussian.py on lines 1022..1022

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 30.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 6 locations. Consider refactoring.
                          Open

                          try:
                              from wafo import mvnprdmod  # @UnresolvedImport
                          except ImportError:
                              warnings.warn('mvnprdmod not found. Check its compilation.')
                              mvnprdmod = None
                          Severity: Major
                          Found in src/wafo/gaussian.py and 5 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 10..14
                          src/wafo/gaussian.py on lines 20..24
                          src/wafo/misc.py on lines 25..29
                          src/wafo/spectrum/core.py on lines 33..37
                          src/wafo/spectrum/core.py on lines 38..42

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 24.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 6 locations. Consider refactoring.
                          Open

                          try:
                              from wafo import rindmod  # @UnresolvedImport
                          except ImportError:
                              warnings.warn('rindmod not found. Check its compilation.')
                              rindmod = None
                          Severity: Major
                          Found in src/wafo/gaussian.py and 5 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 10..14
                          src/wafo/gaussian.py on lines 15..19
                          src/wafo/misc.py on lines 25..29
                          src/wafo/spectrum/core.py on lines 33..37
                          src/wafo/spectrum/core.py on lines 38..42

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 24.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 6 locations. Consider refactoring.
                          Open

                          try:
                              from wafo import mvn  # @UnresolvedImport
                          except ImportError:
                              warnings.warn('mvn not found. Check its compilation.')
                              mvn = None
                          Severity: Major
                          Found in src/wafo/gaussian.py and 5 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 15..19
                          src/wafo/gaussian.py on lines 20..24
                          src/wafo/misc.py on lines 25..29
                          src/wafo/spectrum/core.py on lines 33..37
                          src/wafo/spectrum/core.py on lines 38..42

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 24.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  k2, = nonzero(r[k1] < 0)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 879..879
                          src/wafo/gaussian.py on lines 916..916
                          src/wafo/gaussian.py on lines 946..946

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  k8, = nonzero(r[k1] < 0)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 879..879
                          src/wafo/gaussian.py on lines 893..893
                          src/wafo/gaussian.py on lines 916..916

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                      k5, = nonzero(hk[k13] < 100.e0)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 879..879
                          src/wafo/gaussian.py on lines 893..893
                          src/wafo/gaussian.py on lines 946..946

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  k1, = nonzero(r[k0] < 0.3)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 893..893
                          src/wafo/gaussian.py on lines 916..916
                          src/wafo/gaussian.py on lines 946..946

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      b = abs(h[k13] - k[k13])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/integrate.py on lines 1005..1005

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              c1 = 1.0 / (sqrt(1 - alpha ** 2)) * x / sqrt(m0)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/objects.py on lines 451..451

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              if d is None:
                                  d = zeros(len(rho))
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/sg_filter/_core.py on lines 1196..1197

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      d = (12.e0 - hk[k13]) / 16.e0
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 906..906

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      c = (4.e0 - hk[k13]) / 8.e0
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 907..907

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 23.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              err, val, inform = mvn.mvndst(A, B, infin, L, maxpts, abseps, releps)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 604..605

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 21.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      hk[k12] = -hk[k12]
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 896..896

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 21.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      k[k12] = -k[k12]
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 897..897

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 21.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              if maxpts is None:
                                  maxpts = 1000 * n
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/spectrum/models.py on lines 1110..1111

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 21.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              val, err, ier = mvnprdmod.prbnormndpc(rho, a, b, abserr, relerr,
                                                                    usebreakpoints, usesimpson)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 746..746

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 21.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 15 locations. Consider refactoring.
                          Open

                          if __name__ == '__main__':
                              from wafo.testing import test_docstrings
                              test_docstrings(__file__)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 14 other locations - About 1 hr to fix
                          src/wafo/bitwise.py on lines 85..87
                          src/wafo/containers.py on lines 639..641
                          src/wafo/dctpack.py on lines 435..437
                          src/wafo/demos.py on lines 144..146
                          src/wafo/integrate.py on lines 1470..1472
                          src/wafo/kdetools/demo.py on lines 328..330
                          src/wafo/kdetools/gridding.py on lines 362..364
                          src/wafo/markov.py on lines 1439..1441
                          src/wafo/misc.py on lines 2928..2930
                          src/wafo/padua.py on lines 529..531
                          src/wafo/sg_filter/_core.py on lines 1221..1223
                          src/wafo/sg_filter/demos.py on lines 473..475
                          src/wafo/transform/core.py on lines 214..216
                          src/wafo/wave_theory/dispersion_relation.py on lines 206..208

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 20.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  infin = repeat(2, len(indI) - 1)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/covariance/estimation.py on lines 76..76

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 20.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              aa = np.clip(a - d, -100, 100)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 537..537

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 19.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              bb = np.clip(b - d, -100, 100)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 536..536

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 19.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                      names = ['method', 'xcscale', 'abseps', 'releps', 'coveps',
                                               'maxpts', 'minpts', 'nit', 'xcutoff', 'nc1c2', 'quadno',
                                               'xsplit']
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/fig.py on lines 52..53
                          src/wafo/gaussian.py on lines 27..29
                          src/wafo/integrate.py on lines 19..21

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 18.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                          __all__ = ['Rind', 'rindmod', 'mvnprdmod', 'mvn', 'cdflomax', 'prbnormtndpc',
                                     'prbnormndpc', 'prbnormnd', 'cdfnorm2d', 'prbnorm2d', 'cdfnorm',
                                     'invnorm']
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/fig.py on lines 52..53
                          src/wafo/gaussian.py on lines 311..313
                          src/wafo/integrate.py on lines 19..21

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 18.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 13 locations. Consider refactoring.
                          Open

                              b1, b2, r = np.broadcast_arrays(b1, b2, r)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 12 other locations - About 1 hr to fix
                          src/wafo/covariance/core.py on lines 604..604
                          src/wafo/covariance/core.py on lines 643..643
                          src/wafo/interpolate.py on lines 560..560
                          src/wafo/interpolate.py on lines 615..615
                          src/wafo/misc.py on lines 2585..2585
                          src/wafo/sg_filter/_core.py on lines 1188..1189
                          src/wafo/sg_filter/_core.py on lines 1188..1191
                          src/wafo/sg_filter/_core.py on lines 1203..1203
                          src/wafo/stats/_continuous_distns.py on lines 4632..4632
                          src/wafo/stats/_continuous_distns.py on lines 4678..4678
                          src/wafo/wave_theory/core.py on lines 329..329
                          src/wafo/wave_theory/dispersion_relation.py on lines 147..147

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                      if Nb != Ntd:
                                          raise ValueError('Inconsistent size of b_lo and b_up')
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 1 hr to fix
                          src/wafo/interpolate.py on lines 553..556
                          src/wafo/markov.py on lines 58..59
                          src/wafo/stats/core.py on lines 910..911

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  self.speed = min(max(speed, 1), 13)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 306..306

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      self.xcutoff = max(min(xcut, 8.5), 1.2)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 264..264

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      k4, = nonzero(asr > -100.e0)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 930..930

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              infin = np.repeat(2, 2) - (upper > infinity) - 2 * (lower < -infinity)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 744..744

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                              k6, = nonzero(asr > -100.e0)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 909..909

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              infin = np.repeat(2, n) - (B > infinity) - 2 * (A < -infinity)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 1 other location - About 1 hr to fix
                          src/wafo/gaussian.py on lines 999..999

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 17.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                          _X20 = [-0.9931285991850949e+00, -0.9639719272779138e+00,
                                  - 0.9122344282513259e+00, -0.8391169718222188e+00,
                                  - 0.7463319064601508e+00, -0.6360536807265150e+00,
                                  - 0.5108670019508271e+00, -0.3737060887154196e+00,
                                  - 0.2277858511416451e+00, -0.7652652113349733e-01]
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 776..780
                          src/wafo/spectrum/tests/test_specdata1d.py on lines 43..45
                          src/wafo/spectrum/tests/test_specdata1d.py on lines 49..50
                          src/wafo/tests/test_objects.py on lines 38..41
                          src/wafo/tests/test_objects.py on lines 121..122
                          src/wafo/tests/test_objects.py on lines 128..129
                          src/wafo/tests/test_objects.py on lines 178..181

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 16.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                          _W20 = [0.1761400713915212e-01, 0.4060142980038694e-01,
                                  0.6267204833410906e-01, 0.8327674157670475e-01,
                                  0.1019301198172404e+00, 0.1181945319615184e+00,
                                  0.1316886384491766e+00, 0.1420961093183821e+00,
                                  0.1491729864726037e+00, 0.1527533871307259e+00]
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 1 hr to fix
                          src/wafo/gaussian.py on lines 781..785
                          src/wafo/spectrum/tests/test_specdata1d.py on lines 43..45
                          src/wafo/spectrum/tests/test_specdata1d.py on lines 49..50
                          src/wafo/tests/test_objects.py on lines 38..41
                          src/wafo/tests/test_objects.py on lines 121..122
                          src/wafo/tests/test_objects.py on lines 128..129
                          src/wafo/tests/test_objects.py on lines 178..181

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 16.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 6 locations. Consider refactoring.
                          Open

                                  asr = arcsin(r[k0])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 5 other locations - About 55 mins to fix
                          src/wafo/covariance/core.py on lines 681..681
                          src/wafo/fig.py on lines 717..717
                          src/wafo/interpolate.py on lines 1139..1139
                          src/wafo/kdetools/gridding.py on lines 190..190
                          src/wafo/stats/estimation.py on lines 408..408

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 15.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                      bvn[k18] = -bvn[k18] + np.maximum(0, fi(-h[k18]) - fi(-k[k18]))
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 55 mins to fix
                          src/wafo/gaussian.py on lines 889..889
                          src/wafo/gaussian.py on lines 889..889
                          src/wafo/gaussian.py on lines 949..949

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 15.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  bvn[k0] += fi(-h[k0]) * fi(-k[k0])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 55 mins to fix
                          src/wafo/gaussian.py on lines 889..889
                          src/wafo/gaussian.py on lines 949..949
                          src/wafo/gaussian.py on lines 949..949

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 15.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      tmp = max(abs(11 - abs(speed)), 1)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 55 mins to fix
                          src/wafo/covariance/core.py on lines 595..595

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 15.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              L = correl[ix].ravel()  # % return only off diagonal elements
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 55 mins to fix
                          src/wafo/objects.py on lines 2482..2483

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 15.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              _E3 = rind(Sc, m, Blo, Bup, indI, xc, nt=1)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 50 mins to fix
                          src/wafo/tests/test_gaussian.py on lines 50..50

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 14.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 11 locations. Consider refactoring.
                          Open

                                  Ex, indI = atleast_1d(m, indI)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 10 other locations - About 45 mins to fix
                          src/wafo/demos.py on lines 114..114
                          src/wafo/gaussian.py on lines 393..393
                          src/wafo/misc.py on lines 2672..2672
                          src/wafo/misc.py on lines 2723..2723
                          src/wafo/spectrum/core.py on lines 4112..4112
                          src/wafo/spectrum/models.py on lines 319..319
                          src/wafo/spectrum/models.py on lines 2078..2078
                          src/wafo/stats/_continuous_distns.py on lines 8525..8525
                          src/wafo/tests/test_misc.py on lines 429..429
                          src/wafo/tests/test_misc.py on lines 441..441

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 11 locations. Consider refactoring.
                          Open

                              Bup, Blo = atleast_2d(Bup, Blo)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 10 other locations - About 45 mins to fix
                          src/wafo/demos.py on lines 114..114
                          src/wafo/gaussian.py on lines 344..344
                          src/wafo/misc.py on lines 2672..2672
                          src/wafo/misc.py on lines 2723..2723
                          src/wafo/spectrum/core.py on lines 4112..4112
                          src/wafo/spectrum/models.py on lines 319..319
                          src/wafo/spectrum/models.py on lines 2078..2078
                          src/wafo/stats/_continuous_distns.py on lines 8525..8525
                          src/wafo/tests/test_misc.py on lines 429..429
                          src/wafo/tests/test_misc.py on lines 441..441

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 6 locations. Consider refactoring.
                          Open

                              E0 = rind(Sc, m, Blo, Bup, indI)  # exact prob. 0.001946  A)
                          Severity: Major
                          Found in src/wafo/gaussian.py and 5 other locations - About 45 mins to fix
                          src/wafo/_misc_numba.py on lines 616..616
                          src/wafo/interpolate.py on lines 777..777
                          src/wafo/markov.py on lines 412..412
                          src/wafo/stats/_distn_infrastructure.py on lines 95..95
                          src/wafo/stats/core.py on lines 606..607

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 4 locations. Consider refactoring.
                          Open

                                  Nd = Ntdc - nt - Nc
                          Severity: Major
                          Found in src/wafo/gaussian.py and 3 other locations - About 45 mins to fix
                          src/wafo/markov.py on lines 654..654
                          src/wafo/stats/core.py on lines 1034..1034
                          src/wafo/stats/core.py on lines 1048..1048

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                      a2 = (1 - r[k13]) * (1 + r[k13])
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 45 mins to fix
                          src/wafo/gaussian.py on lines 935..935
                          src/wafo/stats/_continuous_distns.py on lines 8351..8351

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                                                     (2 * (1 + rs[k6]))) / rs[k6] -
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 45 mins to fix
                          src/wafo/gaussian.py on lines 902..902
                          src/wafo/stats/_continuous_distns.py on lines 8351..8351

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                      indI = r_[-1:Ntd]
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 45 mins to fix
                          src/wafo/misc.py on lines 1072..1072
                          src/wafo/misc.py on lines 1075..1075

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              B = np.clip(b, -100, 100)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 45 mins to fix
                          src/wafo/gaussian.py on lines 738..738

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  k7, = nonzero(r[k1] > 0)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 45 mins to fix
                          src/wafo/kdetools/kdetools.py on lines 735..735

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              A = np.clip(a, -100, 100)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 45 mins to fix
                          src/wafo/gaussian.py on lines 739..739

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      trunc_error = 0.1 * self.abseps
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 45 mins to fix
                          src/wafo/kdetools/kdetools.py on lines 659..659

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 13.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                  if xc is None:
                                      xc = zeros((0, 1))
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 40 mins to fix
                          src/wafo/gaussian.py on lines 389..389
                          src/wafo/spectrum/core.py on lines 3876..3876

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 12.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                              xc = zeros((0, 1))
                          Severity: Major
                          Found in src/wafo/gaussian.py and 2 other locations - About 40 mins to fix
                          src/wafo/gaussian.py on lines 323..324
                          src/wafo/spectrum/core.py on lines 3876..3876

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 12.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          _X12 = [-0.9815606342467191e+00, -0.9041172563704750e+00,
                                  -0.7699026741943050e+00,
                                  - 0.5873179542866171e+00, -0.3678314989981802e+00,
                                  -0.1252334085114692e+00]
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 40 mins to fix
                          src/wafo/gaussian.py on lines 769..770

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 12.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                          _W12 = [0.4717533638651177e-01, 0.1069393259953183e+00, 0.1600783285433464e+00,
                                  0.2031674267230659e+00, 0.2334925365383547e+00, 0.2491470458134029e+00]
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 40 mins to fix
                          src/wafo/gaussian.py on lines 771..774

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 12.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 23 locations. Consider refactoring.
                          Open

                                  ind2 = indI + 1
                          Severity: Major
                          Found in src/wafo/gaussian.py and 22 other locations - About 35 mins to fix
                          src/wafo/_misc_numba.py on lines 192..192
                          src/wafo/integrate.py on lines 348..348
                          src/wafo/objects.py on lines 2572..2572
                          src/wafo/spectrum/core.py on lines 2132..2132
                          src/wafo/spectrum/core.py on lines 3472..3472
                          src/wafo/spectrum/models.py on lines 1117..1117
                          src/wafo/stats/estimation.py on lines 1624..1624
                          src/wafo/win32_utils.py on lines 15..15
                          src/wafo/win32_utils.py on lines 16..16
                          src/wafo/win32_utils.py on lines 17..17
                          src/wafo/win32_utils.py on lines 18..18
                          src/wafo/win32_utils.py on lines 19..19
                          src/wafo/win32_utils.py on lines 20..20
                          src/wafo/win32_utils.py on lines 21..21
                          src/wafo/win32_utils.py on lines 22..22
                          src/wafo/win32_utils.py on lines 23..23
                          src/wafo/win32_utils.py on lines 24..24
                          src/wafo/win32_utils.py on lines 25..25
                          src/wafo/win32_utils.py on lines 26..26
                          src/wafo/win32_utils.py on lines 27..27
                          src/wafo/win32_utils.py on lines 28..28
                          src/wafo/win32_utils.py on lines 29..29

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                                  elif speed in (1, 2, 3):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 35 mins to fix
                          src/wafo/containers.py on lines 596..596
                          src/wafo/gaussian.py on lines 268..268
                          src/wafo/gaussian.py on lines 272..272
                          src/wafo/gaussian.py on lines 274..274
                          src/wafo/integrate.py on lines 971..971
                          src/wafo/spectrum/core.py on lines 2084..2084
                          src/wafo/stats/estimation.py on lines 182..182

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                                  elif speed in (7, 8, 9):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 35 mins to fix
                          src/wafo/containers.py on lines 596..596
                          src/wafo/gaussian.py on lines 268..268
                          src/wafo/gaussian.py on lines 274..274
                          src/wafo/gaussian.py on lines 277..277
                          src/wafo/integrate.py on lines 971..971
                          src/wafo/spectrum/core.py on lines 2084..2084
                          src/wafo/stats/estimation.py on lines 182..182

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                                  if speed in (11, 12, 13):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 35 mins to fix
                          src/wafo/containers.py on lines 596..596
                          src/wafo/gaussian.py on lines 272..272
                          src/wafo/gaussian.py on lines 274..274
                          src/wafo/gaussian.py on lines 277..277
                          src/wafo/integrate.py on lines 971..971
                          src/wafo/spectrum/core.py on lines 2084..2084
                          src/wafo/stats/estimation.py on lines 182..182

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 8 locations. Consider refactoring.
                          Open

                                  elif speed in (4, 5, 6):
                          Severity: Major
                          Found in src/wafo/gaussian.py and 7 other locations - About 35 mins to fix
                          src/wafo/containers.py on lines 596..596
                          src/wafo/gaussian.py on lines 268..268
                          src/wafo/gaussian.py on lines 272..272
                          src/wafo/gaussian.py on lines 277..277
                          src/wafo/integrate.py on lines 971..971
                          src/wafo/spectrum/core.py on lines 2084..2084
                          src/wafo/stats/estimation.py on lines 182..182

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                      self.__dict__.update(**kwds)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 35 mins to fix
                          src/wafo/gaussian.py on lines 235..235

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Identical blocks of code found in 2 locations. Consider refactoring.
                          Open

                                  self.__dict__.update(**kwds)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 35 mins to fix
                          src/wafo/gaussian.py on lines 321..321

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                              ind = nonzero(indI[1:])[0]
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 2 other locations - About 35 mins to fix
                          src/wafo/interpolate.py on lines 620..620
                          src/wafo/stats/_distn_infrastructure.py on lines 152..152

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                                              rs = sqrt(1 - xs)
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 2 other locations - About 35 mins to fix
                          src/wafo/sg_filter/_core.py on lines 413..413
                          src/wafo/stats/core.py on lines 459..459

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 3 locations. Consider refactoring.
                          Open

                              k1, = nonzero((0.925 <= abs(r)) & (abs(r) <= 1))
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 2 other locations - About 35 mins to fix
                          src/wafo/sg_filter/_core.py on lines 1186..1186
                          src/wafo/stats/core.py on lines 592..592

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 2 locations. Consider refactoring.
                          Open

                              if (lower >= upper).any():
                          Severity: Minor
                          Found in src/wafo/gaussian.py and 1 other location - About 35 mins to fix
                          src/wafo/stats/estimation.py on lines 366..366

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 11.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 25 locations. Consider refactoring.
                          Open

                              m, n = correl.shape
                          Severity: Major
                          Found in src/wafo/gaussian.py and 24 other locations - About 30 mins to fix
                          src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
                          src/wafo/gaussian.py on lines 335..335
                          src/wafo/graphutil.py on lines 238..238
                          src/wafo/kdetools/gridding.py on lines 230..230
                          src/wafo/kdetools/gridding.py on lines 341..341
                          src/wafo/kdetools/kdetools.py on lines 226..226
                          src/wafo/kdetools/kdetools.py on lines 709..709
                          src/wafo/kdetools/kdetools.py on lines 759..759
                          src/wafo/kdetools/kdetools.py on lines 773..773
                          src/wafo/kdetools/kdetools.py on lines 805..805
                          src/wafo/kdetools/kernels.py on lines 755..755
                          src/wafo/kdetools/kernels.py on lines 799..799
                          src/wafo/kdetools/kernels.py on lines 885..885
                          src/wafo/kdetools/kernels.py on lines 999..999
                          src/wafo/kdetools/kernels.py on lines 1103..1103
                          src/wafo/kdetools/kernels.py on lines 1230..1230
                          src/wafo/misc.py on lines 1188..1188
                          src/wafo/misc.py on lines 2885..2885
                          src/wafo/spectrum/core.py on lines 4114..4114
                          src/wafo/stats/core.py on lines 951..951
                          src/wafo/stats/core.py on lines 952..952
                          src/wafo/stats/core.py on lines 953..953
                          src/wafo/stats/core.py on lines 1253..1253
                          src/wafo/stats/core.py on lines 1353..1353

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 10.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Similar blocks of code found in 25 locations. Consider refactoring.
                          Open

                                  unused_Mb, Nb = b_lo.shape
                          Severity: Major
                          Found in src/wafo/gaussian.py and 24 other locations - About 30 mins to fix
                          src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
                          src/wafo/gaussian.py on lines 717..717
                          src/wafo/graphutil.py on lines 238..238
                          src/wafo/kdetools/gridding.py on lines 230..230
                          src/wafo/kdetools/gridding.py on lines 341..341
                          src/wafo/kdetools/kdetools.py on lines 226..226
                          src/wafo/kdetools/kdetools.py on lines 709..709
                          src/wafo/kdetools/kdetools.py on lines 759..759
                          src/wafo/kdetools/kdetools.py on lines 773..773
                          src/wafo/kdetools/kdetools.py on lines 805..805
                          src/wafo/kdetools/kernels.py on lines 755..755
                          src/wafo/kdetools/kernels.py on lines 799..799
                          src/wafo/kdetools/kernels.py on lines 885..885
                          src/wafo/kdetools/kernels.py on lines 999..999
                          src/wafo/kdetools/kernels.py on lines 1103..1103
                          src/wafo/kdetools/kernels.py on lines 1230..1230
                          src/wafo/misc.py on lines 1188..1188
                          src/wafo/misc.py on lines 2885..2885
                          src/wafo/spectrum/core.py on lines 4114..4114
                          src/wafo/stats/core.py on lines 951..951
                          src/wafo/stats/core.py on lines 952..952
                          src/wafo/stats/core.py on lines 953..953
                          src/wafo/stats/core.py on lines 1253..1253
                          src/wafo/stats/core.py on lines 1353..1353

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 10.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Rename function "fi" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
                          Open

                          def fi(x):
                          Severity: Major
                          Found in src/wafo/gaussian.py by sonar-python

                          Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

                          Noncompliant Code Example

                          With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

                          def MyFunction(a,b):
                              ...
                          

                          Compliant Solution

                          def my_function(a,b):
                              ...
                          

                          There are no issues that match your filters.

                          Category
                          Status