wafo-project/pywafo

View on GitHub
src/wafo/stats/core.py

Summary

Maintainability
F
3 wks
Test Coverage

File core.py has 1165 lines of code (exceeds 1000 allowed). Consider refactoring.
Open

import warnings
from wafo.containers import PlotData
from wafo.misc import findextrema
from scipy import special
import numpy as np
Severity: Major
Found in src/wafo/stats/core.py - About 5 hrs to fix

    Cyclomatic complexity is too high in method fit. (15)
    Open

        def fit(self, y, X=None, theta0=None, beta0=None):
            """
            Member variables
          .df           : degrees of freedom for error.
          .params       : estimated model parameters
    Severity: Minor
    Found in src/wafo/stats/core.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

    Function fit has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        def fit(self, y, X=None, theta0=None, beta0=None):
            """
            Member variables
          .df           : degrees of freedom for error.
          .params       : estimated model parameters
    Severity: Major
    Found in src/wafo/stats/core.py - About 2 hrs to fix

      Function fit has a Cognitive Complexity of 27 (exceeds 15 allowed). Consider refactoring.
      Open

          def fit(self, y, X=None, theta0=None, beta0=None):
              """
              Member variables
            .df           : degrees of freedom for error.
            .params       : estimated model parameters
      Severity: Minor
      Found in src/wafo/stats/core.py - About 2 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 method predict. (8)
      Open

          def predict(self, Xnew=None, alpha=0.05, fulloutput=False):
              """LOGIT/PREDICT Predict from a fitted LOGIT object
      
               CALL [y,ylo,yup] = predict(Xnew,options)
      
      
      Severity: Minor
      Found in src/wafo/stats/core.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 compare. (7)
      Open

          def compare(self, object2):
              """ Compare  small LOGIT versus large one
      
              CALL     [pvalue] = compare(object2)
      
      
      Severity: Minor
      Found in src/wafo/stats/core.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 dispersion_idx. (6)
      Open

      def dispersion_idx(
          data, t=None, u=None, umin=None, umax=None, nu=None, nmin=10, tb=1,
              alpha=0.05, plotflag=False):
          """Return Dispersion Index vs threshold
      
      
      Severity: Minor
      Found in src/wafo/stats/core.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 check_xy. (6)
      Open

          def check_xy(self, y, X):
              y = np.round(np.atleast_2d(y))
              my = y.shape[0]
              if X is None:
                  X = np.zeros((my, 0))
      Severity: Minor
      Found in src/wafo/stats/core.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

      Function __init__ has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          def __init__(self, maxiter=500, accuracy=1e-6, alpha=0.05,
                       deletecolinear=True, verbose=False):
      
              self.maxiter = maxiter
              self.accuracy = accuracy
      Severity: Minor
      Found in src/wafo/stats/core.py - About 1 hr to fix

        Function dispersion_idx has 27 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        def dispersion_idx(
            data, t=None, u=None, umin=None, umax=None, nu=None, nmin=10, tb=1,
                alpha=0.05, plotflag=False):
            """Return Dispersion Index vs threshold
        
        
        Severity: Minor
        Found in src/wafo/stats/core.py - About 1 hr to fix

          Function dispersion_idx has 10 arguments (exceeds 7 allowed). Consider refactoring.
          Open

          def dispersion_idx(
          Severity: Major
          Found in src/wafo/stats/core.py - About 50 mins to fix

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

            def reslife(data, u=None, umin=None, umax=None, nu=None, nmin=3, alpha=0.05,
            Severity: Major
            Found in src/wafo/stats/core.py - About 35 mins to fix

              Function "dispersion_idx" has 10 parameters, which is greater than the 7 authorized.
              Open

                  data, t=None, u=None, umin=None, umax=None, nu=None, nmin=10, tb=1,
                      alpha=0.05, plotflag=False):
              Severity: Major
              Found in src/wafo/stats/core.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):
                  ...
              

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

                  def fit(self, y, X=None, theta0=None, beta0=None):
              Severity: Critical
              Found in src/wafo/stats/core.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 "reslife" has 8 parameters, which is greater than the 7 authorized.
              Open

              def reslife(data, u=None, umin=None, umax=None, nu=None, nmin=3, alpha=0.05,
                          plotflag=False):
              Severity: Major
              Found in src/wafo/stats/core.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

              #    cvals= np.logspace(-1,4,10)
              Severity: Major
              Found in src/wafo/stats/core.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

                              #txt[-1] = ' %d' % iy[-1]
              Severity: Major
              Found in src/wafo/stats/core.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

                  # mrl1 = valarray(nu)
              Severity: Major
              Found in src/wafo/stats/core.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

                      # nulldf;  nulldf =  n - nz
              Severity: Major
              Found in src/wafo/stats/core.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"

              Take the required action to fix the issue indicated by this "FIXME" comment.
              Open

                  # FIXME: the iris dataset has only 4 features!
              Severity: Major
              Found in src/wafo/stats/core.py by sonar-python

              FIXME tags are commonly used to mark places where a bug is suspected, but which the developer wants to deal with later.

              Sometimes the developer will not have the time or will simply forget to get back to that tag.

              This rule is meant to track those tags and to ensure that they do not go unnoticed.

              Noncompliant Code Example

              def divide(numerator, denominator):
                return numerator / denominator              # FIXME denominator value might be 0
              

              See

              Remove this commented out code.
              Open

                              # Var(eta_i) = var(theta_i+Xnew*b)
              Severity: Major
              Found in src/wafo/stats/core.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"

              FIXME found
              Open

                  # FIXME: the iris dataset has only 4 features!
              Severity: Minor
              Found in src/wafo/stats/core.py by fixme

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

                  y = (2 * (np.cos(X) > 2 * np.random.rand(40, 1) - 1) - 1).ravel()
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 4 hrs to fix
              src/wafo/stats/core.py on lines 1438..1438
              src/wafo/stats/core.py on lines 1463..1463

              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 54.

              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 3 locations. Consider refactoring.
              Open

                  y = (2 * (np.cos(X) > 2 * np.random.rand(40, 1) - 1) - 1).ravel()
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 4 hrs to fix
              src/wafo/stats/core.py on lines 1423..1423
              src/wafo/stats/core.py on lines 1438..1438

              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 54.

              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 3 locations. Consider refactoring.
              Open

                  y = (2 * (np.cos(X) > 2 * np.random.rand(40, 1) - 1) - 1).ravel()
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 4 hrs to fix
              src/wafo/stats/core.py on lines 1423..1423
              src/wafo/stats/core.py on lines 1463..1463

              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 54.

              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 3 locations. Consider refactoring.
              Open

                  X = np.sort(5 * np.random.rand(40, 1) - 2.5, axis=0)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1437..1437
              src/wafo/stats/core.py on lines 1462..1462

              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 36.

              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 3 locations. Consider refactoring.
              Open

                  X = np.sort(5 * np.random.rand(40, 1) - 2.5, axis=0)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1422..1422
              src/wafo/stats/core.py on lines 1437..1437

              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 36.

              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 3 locations. Consider refactoring.
              Open

                  X = np.sort(5 * np.random.rand(40, 1) - 2.5, axis=0)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1422..1422
              src/wafo/stats/core.py on lines 1462..1462

              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 36.

              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

                  x = np.sort(5 * np.random.rand(n, 1) - 2.5, axis=0)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/kdetools/demo.py on lines 266..266

              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 36.

              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

                  plt.scatter(X, .5 * np.cos(X) + 0.5, c='k', label='True model')
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1444..1444

              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 35.

              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

                  plt.scatter(X, .5 * np.cos(X) + 0.5, c='k', label='True model')
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1477..1477

              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 35.

              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

                          ylo1 = np.diff(np.hstack((zeros((n, 1)), mulo, one)), n=1, axis=1)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1296..1296

              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 35.

              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

                          yup1 = np.diff(np.hstack((zeros((n, 1)), muup, one)), n=1, axis=1)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/stats/core.py on lines 1295..1295

              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 35.

              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

                      z1 = z1[:, np.flatnonzero(z1.any(axis=0))]
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/stats/core.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 28.

              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

                      z = z[:, np.flatnonzero(z.any(axis=0))]
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 2 hrs to fix
              src/wafo/stats/core.py on lines 950..950

              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 28.

              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

                          if ((dev - devold) / np.dot(dl, tb - tbold) < 0):
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 987..987

              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 26.

              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

                              while ((dev - devold) / np.dot(dl, tb - tbold) > 0):
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 984..984

              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 26.

              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

                      g1 = _logitinv(np.dot(z1x, beta)).reshape((-1, 1))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1316..1316

              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 25.

              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

                      k1, = np.where((di_low < di) & (di < di_up))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/containers.py on lines 171..171

              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 25.

              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

                      g = _logitinv(np.dot(zx, beta)).reshape((-1, 1))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1317..1317

              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 25.

              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

              def _logit(p):
                  return np.log(p) - np.log1p(-p)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/kdetools/kdetools.py on lines 52..52

              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 25.

              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

                  yp, tp = data[I], t[I]
              Severity: Major
              Found in src/wafo/stats/core.py and 7 other locations - About 1 hr to fix
              src/wafo/kdetools/kernels.py on lines 911..911
              src/wafo/misc.py on lines 2435..2435
              src/wafo/objects.py on lines 266..266
              src/wafo/stats/core.py on lines 1367..1367
              src/wafo/stats/core.py on lines 1373..1373
              src/wafo/tests/test_misc.py on lines 165..165
              src/wafo/tests/test_misc.py on lines 205..205

              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 8 locations. Consider refactoring.
              Open

                  ytc, ttc = data[itc], t[itc]
              Severity: Major
              Found in src/wafo/stats/core.py and 7 other locations - About 1 hr to fix
              src/wafo/kdetools/kernels.py on lines 911..911
              src/wafo/misc.py on lines 2435..2435
              src/wafo/objects.py on lines 266..266
              src/wafo/stats/core.py on lines 1371..1371
              src/wafo/stats/core.py on lines 1373..1373
              src/wafo/tests/test_misc.py on lines 165..165
              src/wafo/tests/test_misc.py on lines 205..205

              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 8 locations. Consider refactoring.
              Open

                  ye, te = yp[Ie], tp[Ie]
              Severity: Major
              Found in src/wafo/stats/core.py and 7 other locations - About 1 hr to fix
              src/wafo/kdetools/kernels.py on lines 911..911
              src/wafo/misc.py on lines 2435..2435
              src/wafo/objects.py on lines 266..266
              src/wafo/stats/core.py on lines 1367..1367
              src/wafo/stats/core.py on lines 1371..1371
              src/wafo/tests/test_misc.py on lines 165..165
              src/wafo/tests/test_misc.py on lines 205..205

              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

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

                          localstat = abs(
                              self.deviance_null - self.deviance) / self.dispersionfit
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1160..1161

              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

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

                          localstat = abs(self.deviance_null - self.deviance) / \
                              self.dispersionfit / (self.numvar - 1)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1166..1167

              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

                      PlotData(vstack([di_low * ones(nu), di_up * ones(nu)]).T, u,
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/misc.py on lines 2335..2335

              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

                              np.dot(dl, np.linalg.lstsq(d2l, dl)[0]) / len(dl)) <= tol
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/markov.py on lines 378..378

              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

                      v = g * (1 - g) / p
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1333..1333

              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

                      v1 = g1 * (1 - g1) / p
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1332..1332

              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

                      w1 = v1 * (1 - 2 * g1)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1338..1338

              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

                      w = v * (1 - 2 * g)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1339..1339

              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

                  res.workspace = dict(
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/spectrum/models.py on lines 440..440

              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 22.

              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

                  umax = sdmax if umax is None else min(umax, sdmax)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.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 22.

              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

                  umin = sdmin if umin is None else max(umin, sdmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 146..146

              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 22.

              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

                          notnans = np.flatnonzero(1 - (1 - np.isfinite(Xnew)).any(axis=1))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/kdetools/kernels.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 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

                          (y * 0 + 1) * np.arange(ymin + 1, ymax + 1))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/padua.py on lines 399..399

              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

                  svr_rbf = SVR(kernel='rbf', C=1e4, gamma=0.1, probability=True)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1469..1469

              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

                  svr_poly = SVR(kernel='poly', C=1e4, degree=2, probability=True)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1467..1467

              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 5 locations. Consider refactoring.
              Open

                                  [dev, dl, d2l] = self.loglike(tb, y, X, z, z1)
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/interpolate.py on lines 584..584
              src/wafo/stats/core.py on lines 968..968
              src/wafo/stats/core.py on lines 983..983
              src/wafo/stats/estimation.py on lines 483..484

              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 5 locations. Consider refactoring.
              Open

                          [dev, dl, d2l] = self.loglike(tb, y, X, z, z1)
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/interpolate.py on lines 584..584
              src/wafo/stats/core.py on lines 968..968
              src/wafo/stats/core.py on lines 994..994
              src/wafo/stats/estimation.py on lines 483..484

              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 5 locations. Consider refactoring.
              Open

                      [dev, dl, d2l] = self.loglike(tb, y, X, z, z1)
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/interpolate.py on lines 584..584
              src/wafo/stats/core.py on lines 983..983
              src/wafo/stats/core.py on lines 994..994
              src/wafo/stats/estimation.py on lines 483..484

              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

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

                          eta = (y * 0 + 1) * theta
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.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 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

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

                          eta = ((X * beta) * ones((1, nz))) + ((y * 0 + 1) * theta)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.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 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

                              txt = [' %d,' % i for i in iy]
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              source/mvnprd/setup.py on lines 16..16

              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

                          crit = -_invnorm(alpha / 2)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/kdetools/kdetools.py on lines 1019..1019

              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 3 locations. Consider refactoring.
              Open

                  y_rbf = svr_rbf.fit(X, y).predict(X)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1471..1471
              src/wafo/stats/core.py on lines 1472..1472

              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 3 locations. Consider refactoring.
              Open

                  y_poly = svr_poly.fit(X, y).predict(X)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1470..1470
              src/wafo/stats/core.py on lines 1471..1471

              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 3 locations. Consider refactoring.
              Open

              def reslife(data, u=None, umin=None, umax=None, nu=None, nmin=3, alpha=0.05,
                          plotflag=False):
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/sg_filter/_core.py on lines 516..517
              src/wafo/sg_filter/_core.py on lines 575..576

              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 3 locations. Consider refactoring.
              Open

                  y_lin = svr_lin.fit(X, y).predict(X)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1470..1470
              src/wafo/stats/core.py on lines 1472..1472

              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 2 locations. Consider refactoring.
              Open

              def valarray(shape, value=nan, typecode=None):
                  """Return an array of all value.
                  """
                  return np.full(shape, value, dtype=typecode)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/misc.py on lines 579..615

              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 15 locations. Consider refactoring.
              Open

                      y = np.round(np.atleast_2d(y))
              Severity: Major
              Found in src/wafo/stats/core.py and 14 other locations - About 1 hr to fix
              src/wafo/interpolate.py on lines 90..90
              src/wafo/interpolate.py on lines 91..91
              src/wafo/kdetools/kdetools.py on lines 1097..1100
              src/wafo/kdetools/kdetools.py on lines 1155..1155
              src/wafo/kdetools/kdetools.py on lines 1192..1192
              src/wafo/markov.py on lines 32..32
              src/wafo/markov.py on lines 609..609
              src/wafo/markov.py on lines 684..684
              src/wafo/misc.py on lines 1672..1672
              src/wafo/stats/_continuous_distns.py on lines 5428..5428
              src/wafo/stats/_continuous_distns.py on lines 5444..5444
              src/wafo/stats/estimation.py on lines 386..386
              src/wafo/stats/estimation.py on lines 1157..1157
              src/wafo/tests/test_gaussian.py on lines 45..45

              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 5 locations. Consider refactoring.
              Open

              def _invt(q, df):
                  return special.stdtrit(df, q)  # pylint: disable=no-member
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/objects.py on lines 52..53
              src/wafo/stats/core.py on lines 38..39
              src/wafo/stats/core.py on lines 46..47
              src/wafo/stats/core.py on lines 50..51

              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 5 locations. Consider refactoring.
              Open

              def _invchi2(q, df):
                  return special.chdtri(df, q)  # pylint: disable=no-member
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/objects.py on lines 52..53
              src/wafo/stats/core.py on lines 38..39
              src/wafo/stats/core.py on lines 42..43
              src/wafo/stats/core.py on lines 46..47

              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 5 locations. Consider refactoring.
              Open

              def _cdft(x, df):
                  return special.stdtr(df, x)  # pylint: disable=no-member
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/objects.py on lines 52..53
              src/wafo/stats/core.py on lines 42..43
              src/wafo/stats/core.py on lines 46..47
              src/wafo/stats/core.py on lines 50..51

              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 5 locations. Consider refactoring.
              Open

              def _cdfchi2(x, df):
                  return special.chdtr(df, x)  # pylint: disable=no-member
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/objects.py on lines 52..53
              src/wafo/stats/core.py on lines 38..39
              src/wafo/stats/core.py on lines 42..43
              src/wafo/stats/core.py on lines 50..51

              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

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

                  mrlu = mrl + z_a * srl / sqrt(num)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 237..237

              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

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

                  [mu, plo, pup] = b.predict(fulloutput=True)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1394..1394

              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 (mx != my):
                          raise ValueError(
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 1 hr to fix
              src/wafo/gaussian.py on lines 340..341
              src/wafo/interpolate.py on lines 553..556
              src/wafo/markov.py on lines 58..59

              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

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

                  mrll = mrl - z_a * srl / sqrt(num)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 236..236

              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

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

                  [mu, plo, pup] = b.predict(fulloutput=True)  # @UnusedVariable
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1407..1407

              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 3 locations. Consider refactoring.
              Open

                  i_ok, = where(1 - is_too_close[o_order])
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/covariance/core.py on lines 636..636
              src/wafo/covariance/core.py on lines 682..682

              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 3 locations. Consider refactoring.
              Open

                  plt.plot(X, y_rbf, c='g', label='RBF model')
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1480..1480
              src/wafo/stats/core.py on lines 1481..1481

              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 3 locations. Consider refactoring.
              Open

              __all__ = [
                  'edf', 'edfcnd', 'reslife', 'dispersion_idx', 'decluster', 'findpot',
                         'declustering_time', 'interexceedance_times', 'extremal_idx',
                         'returnperiod2sf', 'sf2returnperiod']
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              docs/conf.py on lines 60..71
              src/wafo/interpolate.py on lines 11..14

              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 3 locations. Consider refactoring.
              Open

                  M = maxt - mint + 1
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/markov.py on lines 365..365
              src/wafo/spectrum/core.py on lines 1435..1435

              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 3 locations. Consider refactoring.
              Open

                          localstat = abs(devL - devs) / disprsn / pmq
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/misc.py on lines 2662..2662
              src/wafo/stats/core.py on lines 1143..1143

              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 3 locations. Consider refactoring.
              Open

                  plt.plot(X, y_lin, c='r', label='Linear model')
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1479..1479
              src/wafo/stats/core.py on lines 1481..1481

              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 3 locations. Consider refactoring.
              Open

                          ix = np.flatnonzero(s > tol)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/misc.py on lines 1678..1678
              src/wafo/objects.py on lines 1055..1055

              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 3 locations. Consider refactoring.
              Open

                          localstat = abs(devL - devs) / disprsn
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/misc.py on lines 2662..2662
              src/wafo/stats/core.py on lines 1139..1139

              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 3 locations. Consider refactoring.
              Open

                  plt.plot(X, y_poly, c='b', label='Polynomial model')
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1479..1479
              src/wafo/stats/core.py on lines 1480..1480

              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

                  not_sorted = np.any(dt < 0)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/wave_theory/core.py on lines 344..344

              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

                      epsilon = np.std(d2l) / 1000
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/tests/test_containers.py on lines 49..49

              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

                      if len(i_ok):
                          is_too_close[start + i_ok] = 0
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/covariance/core.py on lines 422..423

              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

                  t1 = np.empty(ti.shape, dtype=int)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/objects.py on lines 453..453

              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 5 locations. Consider refactoring.
              Open

                      print(' R2 =  %2.4f,     R2adj = %2.4f' % (self.R2, self.R2adj))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1175..1175
              src/wafo/stats/core.py on lines 1217..1218
              src/wafo/stats/core.py on lines 1220..1222
              src/wafo/stats/core.py on lines 1224..1225

              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 5 locations. Consider refactoring.
              Open

                      print('Residual deviance: %2.4f  on %d  degrees of freedom' %
                            (self.deviance, self.df))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1175..1175
              src/wafo/stats/core.py on lines 1178..1178
              src/wafo/stats/core.py on lines 1217..1218
              src/wafo/stats/core.py on lines 1220..1222

              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 5 locations. Consider refactoring.
              Open

                      print('(Dispersion parameter for %s family taken to be %2.2f)' %
                            (self.family, self.dispersionfit))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1175..1175
              src/wafo/stats/core.py on lines 1178..1178
              src/wafo/stats/core.py on lines 1220..1222
              src/wafo/stats/core.py on lines 1224..1225

              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 5 locations. Consider refactoring.
              Open

                      if True:  # %options.constant
                          print('    Null deviance: %2.4f  on %d  degrees of freedom' %
                                (self.deviance_null, self.df_null))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1175..1175
              src/wafo/stats/core.py on lines 1178..1178
              src/wafo/stats/core.py on lines 1217..1218
              src/wafo/stats/core.py on lines 1224..1225

              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 5 locations. Consider refactoring.
              Open

                                      ((np.dot(u, R[ib][:, ib])) ** 2).sum(axis=1), eps)
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/covariance/core.py on lines 501..501
              src/wafo/covariance/core.py on lines 501..501
              src/wafo/covariance/core.py on lines 502..502
              src/wafo/markov.py on lines 213..213

              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 5 locations. Consider refactoring.
              Open

                      print('Full     %d       %12.4f' % (self.df, self.deviance))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 1 hr to fix
              src/wafo/stats/core.py on lines 1178..1178
              src/wafo/stats/core.py on lines 1217..1218
              src/wafo/stats/core.py on lines 1220..1222
              src/wafo/stats/core.py on lines 1224..1225

              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 4 locations. Consider refactoring.
              Open

                  res.workspace = dict(umin=umin, umax=umax, nu=nu, nmin=nmin, alpha=alpha)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 1 hr to fix
              src/wafo/doc/tutorial_scripts/chapter2.py on lines 318..318
              src/wafo/stats/estimation.py on lines 751..751
              src/wafo/stats/estimation.py on lines 866..866

              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 2 locations. Consider refactoring.
              Open

                      score.append(clf_LR.score(X, y))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1452..1452

              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 2 locations. Consider refactoring.
              Open

                      i_ok = _find_ok_peaks(di_e[iz], ti_e[iz], tmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/kdetools/kdetools.py on lines 211..211

              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 2 locations. Consider refactoring.
              Open

                      d2l = np.dot(zx.T, (w * zx)) - np.dot(
                          z1x.T, (w1 * z1x)) - np.dot(dlogp.T, dlogp)
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1340..1340

              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 2 locations. Consider refactoring.
              Open

                      score.append(svrf.score(X, y))
              Severity: Major
              Found in src/wafo/stats/core.py and 1 other location - About 1 hr to fix
              src/wafo/stats/core.py on lines 1431..1431

              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 31 locations. Consider refactoring.
              Open

                  prbi, npu = np.broadcast_arrays(q, numevents_per_unit)
              Severity: Major
              Found in src/wafo/stats/core.py and 30 other locations - About 55 mins to fix
              src/wafo/containers.py on lines 203..203
              src/wafo/demos.py on lines 13..13
              src/wafo/demos.py on lines 23..23
              src/wafo/graphutil.py on lines 214..215
              src/wafo/integrate.py on lines 83..83
              src/wafo/interpolate.py on lines 1161..1161
              src/wafo/kdetools/gridding.py on lines 339..339
              src/wafo/kdetools/kernels.py on lines 116..116
              src/wafo/markov.py on lines 489..493
              src/wafo/misc.py on lines 494..494
              src/wafo/misc.py on lines 1334..1334
              src/wafo/misc.py on lines 2429..2429
              src/wafo/padua.py on lines 326..326
              src/wafo/padua.py on lines 475..475
              src/wafo/padua.py on lines 513..513
              src/wafo/sg_filter/demos.py on lines 418..418
              src/wafo/spectrum/models.py on lines 2099..2099
              src/wafo/spectrum/models.py on lines 2108..2108
              src/wafo/stats/_continuous_distns.py on lines 3779..3779
              src/wafo/stats/core.py on lines 495..495
              src/wafo/stats/core.py on lines 937..937
              src/wafo/stats/estimation.py on lines 474..474
              src/wafo/stats/estimation.py on lines 482..482
              src/wafo/tests/test_gaussian.py on lines 47..47
              src/wafo/tests/test_gaussian.py on lines 154..154
              src/wafo/tests/test_misc.py on lines 546..546
              src/wafo/tests/test_misc.py on lines 556..556
              src/wafo/tests/test_misc.py on lines 569..569
              src/wafo/transform/models.py on lines 231..231
              src/wafo/transform/models.py on lines 240..240

              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 31 locations. Consider refactoring.
              Open

                  t, npu = np.broadcast_arrays(period, numevents_per_unit)
              Severity: Major
              Found in src/wafo/stats/core.py and 30 other locations - About 55 mins to fix
              src/wafo/containers.py on lines 203..203
              src/wafo/demos.py on lines 13..13
              src/wafo/demos.py on lines 23..23
              src/wafo/graphutil.py on lines 214..215
              src/wafo/integrate.py on lines 83..83
              src/wafo/interpolate.py on lines 1161..1161
              src/wafo/kdetools/gridding.py on lines 339..339
              src/wafo/kdetools/kernels.py on lines 116..116
              src/wafo/markov.py on lines 489..493
              src/wafo/misc.py on lines 494..494
              src/wafo/misc.py on lines 1334..1334
              src/wafo/misc.py on lines 2429..2429
              src/wafo/padua.py on lines 326..326
              src/wafo/padua.py on lines 475..475
              src/wafo/padua.py on lines 513..513
              src/wafo/sg_filter/demos.py on lines 418..418
              src/wafo/spectrum/models.py on lines 2099..2099
              src/wafo/spectrum/models.py on lines 2108..2108
              src/wafo/stats/_continuous_distns.py on lines 3779..3779
              src/wafo/stats/core.py on lines 534..534
              src/wafo/stats/core.py on lines 937..937
              src/wafo/stats/estimation.py on lines 474..474
              src/wafo/stats/estimation.py on lines 482..482
              src/wafo/tests/test_gaussian.py on lines 47..47
              src/wafo/tests/test_gaussian.py on lines 154..154
              src/wafo/tests/test_misc.py on lines 546..546
              src/wafo/tests/test_misc.py on lines 556..556
              src/wafo/tests/test_misc.py on lines 569..569
              src/wafo/transform/models.py on lines 231..231
              src/wafo/transform/models.py on lines 240..240

              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 18 locations. Consider refactoring.
              Open

              if __name__ == '__main__':
                  # test_reglogit2()
                  test_doctstrings()
              Severity: Major
              Found in src/wafo/stats/core.py and 17 other locations - About 55 mins to fix
              source/c_library/build_all.py on lines 24..25
              source/mreg/build_all.py on lines 29..30
              source/mvn/build_all.py on lines 19..20
              source/mvnprd/build_all.py on lines 25..26
              source/mvnprd/old/mvnprodcorrprb/build_all.py on lines 23..24
              source/rind2007/build_all.py on lines 31..32
              src/wafo/covariance/tests/test_covariance.py on lines 27..28
              src/wafo/graphutil.py on lines 276..277
              src/wafo/interpolate.py on lines 1341..1343
              src/wafo/objects.py on lines 2619..2620
              src/wafo/spectrum/core.py on lines 4415..4416
              src/wafo/spectrum/models.py on lines 2172..2173
              src/wafo/stats/estimation.py on lines 1693..1695
              src/wafo/wave_theory/core.py on lines 595..596
              src/wafo/wavemodels.py on lines 267..268
              build_package.py on lines 125..126
              setup.py on lines 209..210

              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 31 locations. Consider refactoring.
              Open

                      y, X = self.check_xy(y, X)
              Severity: Major
              Found in src/wafo/stats/core.py and 30 other locations - About 55 mins to fix
              src/wafo/containers.py on lines 203..203
              src/wafo/demos.py on lines 13..13
              src/wafo/demos.py on lines 23..23
              src/wafo/graphutil.py on lines 214..215
              src/wafo/integrate.py on lines 83..83
              src/wafo/interpolate.py on lines 1161..1161
              src/wafo/kdetools/gridding.py on lines 339..339
              src/wafo/kdetools/kernels.py on lines 116..116
              src/wafo/markov.py on lines 489..493
              src/wafo/misc.py on lines 494..494
              src/wafo/misc.py on lines 1334..1334
              src/wafo/misc.py on lines 2429..2429
              src/wafo/padua.py on lines 326..326
              src/wafo/padua.py on lines 475..475
              src/wafo/padua.py on lines 513..513
              src/wafo/sg_filter/demos.py on lines 418..418
              src/wafo/spectrum/models.py on lines 2099..2099
              src/wafo/spectrum/models.py on lines 2108..2108
              src/wafo/stats/_continuous_distns.py on lines 3779..3779
              src/wafo/stats/core.py on lines 495..495
              src/wafo/stats/core.py on lines 534..534
              src/wafo/stats/estimation.py on lines 474..474
              src/wafo/stats/estimation.py on lines 482..482
              src/wafo/tests/test_gaussian.py on lines 47..47
              src/wafo/tests/test_gaussian.py on lines 154..154
              src/wafo/tests/test_misc.py on lines 546..546
              src/wafo/tests/test_misc.py on lines 556..556
              src/wafo/tests/test_misc.py on lines 569..569
              src/wafo/transform/models.py on lines 231..231
              src/wafo/transform/models.py on lines 240..240

              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 12 locations. Consider refactoring.
              Open

                      if theta0 is None:
                          theta0 = theta00
              Severity: Major
              Found in src/wafo/stats/core.py and 11 other locations - About 55 mins to fix
              src/wafo/markov.py on lines 103..104
              src/wafo/markov.py on lines 606..607
              src/wafo/spectrum/core.py on lines 3461..3462
              src/wafo/stats/core.py on lines 962..963
              src/wafo/stats/estimation.py on lines 583..584
              src/wafo/stats/estimation.py on lines 1437..1438
              src/wafo/stats/estimation.py on lines 1465..1466
              src/wafo/stats/estimation.py on lines 1491..1492
              src/wafo/stats/estimation.py on lines 1543..1544
              src/wafo/stats/estimation.py on lines 1567..1568
              src/wafo/stats/estimation.py on lines 1590..1591

              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 12 locations. Consider refactoring.
              Open

                      if beta0 is None:
                          beta0 = beta00
              Severity: Major
              Found in src/wafo/stats/core.py and 11 other locations - About 55 mins to fix
              src/wafo/markov.py on lines 103..104
              src/wafo/markov.py on lines 606..607
              src/wafo/spectrum/core.py on lines 3461..3462
              src/wafo/stats/core.py on lines 959..960
              src/wafo/stats/estimation.py on lines 583..584
              src/wafo/stats/estimation.py on lines 1437..1438
              src/wafo/stats/estimation.py on lines 1465..1466
              src/wafo/stats/estimation.py on lines 1491..1492
              src/wafo/stats/estimation.py on lines 1543..1544
              src/wafo/stats/estimation.py on lines 1567..1568
              src/wafo/stats/estimation.py on lines 1590..1591

              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 12 locations. Consider refactoring.
              Open

                      dl = np.sum(dlogp, axis=0)
              Severity: Major
              Found in src/wafo/stats/core.py and 11 other locations - About 55 mins to fix
              src/wafo/kdetools/tests/test_kdetools.py on lines 98..98
              src/wafo/kdetools/tests/test_kdetools.py on lines 105..105
              src/wafo/kdetools/tests/test_kdetools.py on lines 117..117
              src/wafo/kdetools/tests/test_kdetools.py on lines 124..124
              src/wafo/kdetools/tests/test_kdetools.py on lines 169..169
              src/wafo/kdetools/tests/test_kdetools.py on lines 182..182
              src/wafo/markov.py on lines 496..496
              src/wafo/markov.py on lines 497..497
              src/wafo/stats/_distn_infrastructure.py on lines 72..72
              src/wafo/stats/_distn_infrastructure.py on lines 104..104
              src/wafo/stats/estimation.py on lines 1614..1614

              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 10 locations. Consider refactoring.
              Open

                  if t is None:
                      t = np.arange(len(data))
              Severity: Major
              Found in src/wafo/stats/core.py and 9 other locations - About 55 mins to fix
              src/wafo/kdetools/gridding.py on lines 66..66
              src/wafo/kdetools/kdetools.py on lines 439..439
              src/wafo/kdetools/kdetools.py on lines 463..463
              src/wafo/markov.py on lines 120..120
              src/wafo/markov.py on lines 345..345
              src/wafo/markov.py on lines 367..367
              src/wafo/markov.py on lines 611..611
              src/wafo/sg_filter/demos.py on lines 281..281
              src/wafo/stats/core.py on lines 584..585

              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 11 locations. Consider refactoring.
              Open

                      se = sqrt(np.diag(pcov))
              Severity: Major
              Found in src/wafo/stats/core.py and 10 other locations - About 55 mins to fix
              src/wafo/fig.py on lines 790..790
              src/wafo/fig.py on lines 791..791
              src/wafo/integrate_oscillating.py on lines 386..386
              src/wafo/integrate_oscillating.py on lines 387..387
              src/wafo/spectrum/models.py on lines 119..119
              src/wafo/stats/_continuous_distns.py on lines 3793..3793
              src/wafo/stats/_continuous_distns.py on lines 3847..3847
              src/wafo/stats/_continuous_distns.py on lines 8280..8280
              src/wafo/stats/_continuous_distns.py on lines 8336..8336
              src/wafo/stats/_continuous_distns.py on lines 8337..8337

              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 10 locations. Consider refactoring.
              Open

                  if t is None:
                      t = np.arange(len(data))
              Severity: Major
              Found in src/wafo/stats/core.py and 9 other locations - About 55 mins to fix
              src/wafo/kdetools/gridding.py on lines 66..66
              src/wafo/kdetools/kdetools.py on lines 439..439
              src/wafo/kdetools/kdetools.py on lines 463..463
              src/wafo/markov.py on lines 120..120
              src/wafo/markov.py on lines 345..345
              src/wafo/markov.py on lines 367..367
              src/wafo/markov.py on lines 611..611
              src/wafo/sg_filter/demos.py on lines 281..281
              src/wafo/stats/core.py on lines 438..439

              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 9 locations. Consider refactoring.
              Open

              def _invnorm(q):
                  return special.ndtri(q)  # pylint: disable=no-member
              Severity: Major
              Found in src/wafo/stats/core.py and 8 other locations - About 55 mins to fix
              src/wafo/kdetools/kdetools.py on lines 46..47
              src/wafo/stats/_continuous_distns.py on lines 259..260
              src/wafo/stats/_continuous_distns.py on lines 263..264
              src/wafo/stats/_continuous_distns.py on lines 267..268
              src/wafo/stats/core.py on lines 54..55
              src/wafo/tests/test_integrate_oscillating.py on lines 196..197
              src/wafo/tests/test_integrate_oscillating.py on lines 199..200
              src/wafo/tests/test_integrate_oscillating.py on lines 278..279

              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 9 locations. Consider refactoring.
              Open

              def _cdfnorm(x):
                  return special.ndtr(x)  # pylint: disable=no-member
              Severity: Major
              Found in src/wafo/stats/core.py and 8 other locations - About 55 mins to fix
              src/wafo/kdetools/kdetools.py on lines 46..47
              src/wafo/stats/_continuous_distns.py on lines 259..260
              src/wafo/stats/_continuous_distns.py on lines 263..264
              src/wafo/stats/_continuous_distns.py on lines 267..268
              src/wafo/stats/core.py on lines 58..59
              src/wafo/tests/test_integrate_oscillating.py on lines 196..197
              src/wafo/tests/test_integrate_oscillating.py on lines 199..200
              src/wafo/tests/test_integrate_oscillating.py on lines 278..279

              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 7 locations. Consider refactoring.
              Open

                              warnings.warn(
                                  'Covariate matrix is singular. Removing column(s):%s' %
              Severity: Major
              Found in src/wafo/stats/core.py and 6 other locations - About 55 mins to fix
              src/wafo/misc.py on lines 1066..1066
              src/wafo/misc.py on lines 2282..2310
              src/wafo/sg_filter/_core.py on lines 446..448
              src/wafo/sg_filter/_core.py on lines 449..451
              src/wafo/tests/test_integrate_oscillating.py on lines 373..373
              src/wafo/transform/models.py on lines 273..274

              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 6 locations. Consider refactoring.
              Open

                          ecrit = crit * sqrt(vareta)
              Severity: Major
              Found in src/wafo/stats/core.py and 5 other locations - About 55 mins to fix
              src/wafo/spectrum/models.py on lines 968..968
              src/wafo/wave_theory/dispersion_relation.py on lines 154..154
              src/wafo/wave_theory/dispersion_relation.py on lines 164..164
              src/wafo/wave_theory/dispersion_relation.py on lines 201..201
              src/wafo/wave_theory/dispersion_relation.py on lines 202..202

              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 6 locations. Consider refactoring.
              Open

                          if (((As - np.dot(Al, np.linalg.lstsq(Al, As))) > 500 * _EPS).any() or
                                  object2.family != self.family or object2.link != self.link):
                              warnings.warn('Small model not included in large model,' +
              Severity: Major
              Found in src/wafo/stats/core.py and 5 other locations - About 55 mins to fix
              src/wafo/covariance/core.py on lines 590..590
              src/wafo/misc.py on lines 2604..2604
              src/wafo/spectrum/models.py on lines 579..580
              src/wafo/spectrum/models.py on lines 2001..2002
              src/wafo/stats/estimation.py on lines 1616..1618

              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

                  i = np.argsort(-y)  # sort in descending order
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 55 mins to fix
              src/wafo/stats/_continuous_distns.py on lines 2727..2727
              src/wafo/stats/_continuous_distns.py on lines 3925..3925
              src/wafo/stats/_continuous_distns.py on lines 4108..4108

              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

                      umin, umax = _check_umin_umax(data, umin, umax, nmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 55 mins to fix
              src/wafo/integrate.py on lines 1030..1030
              src/wafo/stats/core.py on lines 213..213
              src/wafo/stats/core.py on lines 383..383

              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

                          mulo = _logitinv(eta - ecrit)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 55 mins to fix
              src/wafo/misc.py on lines 2451..2451
              src/wafo/spectrum/core.py on lines 189..189
              src/wafo/stats/_continuous_distns.py on lines 5140..5140

              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

                      umin, umax = _check_umin_umax(data, umin, umax, nmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 55 mins to fix
              src/wafo/integrate.py on lines 1030..1030
              src/wafo/stats/core.py on lines 355..355
              src/wafo/stats/core.py on lines 383..383

              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

                  b_u, ok_u = _find_appropriate_threshold(u, di, di_low, di_up)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 55 mins to fix
              src/wafo/integrate.py on lines 1030..1030
              src/wafo/stats/core.py on lines 213..213
              src/wafo/stats/core.py on lines 355..355

              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 3 locations. Consider refactoring.
              Open

                  o_order[i] = range(num_y)  # indices to the variables original location
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 55 mins to fix
              src/wafo/spectrum/models.py on lines 1875..1875
              src/wafo/stats/_continuous_distns.py on lines 4670..4670

              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

                          s = np.linalg.svd(X)[1]
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 55 mins to fix
              src/wafo/stats/core.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 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

                              print(np.linalg.eig(d2l)[0].T)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 55 mins to fix
              src/wafo/stats/core.py on lines 898..898

              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

                  x = np.arange(1, 11).reshape(-1, 1)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 55 mins to fix
              src/wafo/stats/_continuous_distns.py on lines 974..974

              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

                          muup = _logitinv(eta + ecrit)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 55 mins to fix
              src/wafo/stats/_distn_infrastructure.py on lines 94..94

              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 35 locations. Consider refactoring.
              Open

                      tb = np.hstack((theta0, beta0))
              Severity: Major
              Found in src/wafo/stats/core.py and 34 other locations - About 50 mins to fix
              src/wafo/integrate.py on lines 1160..1160
              src/wafo/integrate_oscillating.py on lines 294..294
              src/wafo/kdetools/demo.py on lines 274..274
              src/wafo/kdetools/tests/test_gridding.py on lines 35..35
              src/wafo/markov.py on lines 62..62
              src/wafo/markov.py on lines 217..217
              src/wafo/markov.py on lines 273..273
              src/wafo/markov.py on lines 400..400
              src/wafo/markov.py on lines 498..498
              src/wafo/markov.py on lines 631..631
              src/wafo/markov.py on lines 800..800
              src/wafo/markov.py on lines 1170..1170
              src/wafo/markov.py on lines 1171..1171
              src/wafo/markov.py on lines 1175..1175
              src/wafo/markov.py on lines 1176..1176
              src/wafo/markov.py on lines 1185..1185
              src/wafo/markov.py on lines 1186..1186
              src/wafo/misc.py on lines 2300..2300
              src/wafo/misc.py on lines 2471..2471
              src/wafo/misc.py on lines 2477..2477
              src/wafo/misc.py on lines 2552..2552
              src/wafo/objects.py on lines 785..785
              src/wafo/objects.py on lines 1012..1012
              src/wafo/sg_filter/demos.py on lines 123..124
              src/wafo/sg_filter/demos.py on lines 172..172
              src/wafo/sg_filter/demos.py on lines 185..185
              src/wafo/spectrum/core.py on lines 1707..1707
              src/wafo/stats/core.py on lines 972..972
              src/wafo/stats/core.py on lines 1281..1281
              src/wafo/stats/core.py on lines 1314..1314
              src/wafo/stats/core.py on lines 1315..1315
              src/wafo/stats/estimation.py on lines 1225..1225
              src/wafo/wavemodels.py on lines 119..119
              src/wafo/wavemodels.py on lines 220..220

              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 35 locations. Consider refactoring.
              Open

                              u = np.hstack((one, Xnew))
              Severity: Major
              Found in src/wafo/stats/core.py and 34 other locations - About 50 mins to fix
              src/wafo/integrate.py on lines 1160..1160
              src/wafo/integrate_oscillating.py on lines 294..294
              src/wafo/kdetools/demo.py on lines 274..274
              src/wafo/kdetools/tests/test_gridding.py on lines 35..35
              src/wafo/markov.py on lines 62..62
              src/wafo/markov.py on lines 217..217
              src/wafo/markov.py on lines 273..273
              src/wafo/markov.py on lines 400..400
              src/wafo/markov.py on lines 498..498
              src/wafo/markov.py on lines 631..631
              src/wafo/markov.py on lines 800..800
              src/wafo/markov.py on lines 1170..1170
              src/wafo/markov.py on lines 1171..1171
              src/wafo/markov.py on lines 1175..1175
              src/wafo/markov.py on lines 1176..1176
              src/wafo/markov.py on lines 1185..1185
              src/wafo/markov.py on lines 1186..1186
              src/wafo/misc.py on lines 2300..2300
              src/wafo/misc.py on lines 2471..2471
              src/wafo/misc.py on lines 2477..2477
              src/wafo/misc.py on lines 2552..2552
              src/wafo/objects.py on lines 785..785
              src/wafo/objects.py on lines 1012..1012
              src/wafo/sg_filter/demos.py on lines 123..124
              src/wafo/sg_filter/demos.py on lines 172..172
              src/wafo/sg_filter/demos.py on lines 185..185
              src/wafo/spectrum/core.py on lines 1707..1707
              src/wafo/stats/core.py on lines 965..965
              src/wafo/stats/core.py on lines 972..972
              src/wafo/stats/core.py on lines 1314..1314
              src/wafo/stats/core.py on lines 1315..1315
              src/wafo/stats/estimation.py on lines 1225..1225
              src/wafo/wavemodels.py on lines 119..119
              src/wafo/wavemodels.py on lines 220..220

              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 35 locations. Consider refactoring.
              Open

                      z1x = np.hstack((z1, x))
              Severity: Major
              Found in src/wafo/stats/core.py and 34 other locations - About 50 mins to fix
              src/wafo/integrate.py on lines 1160..1160
              src/wafo/integrate_oscillating.py on lines 294..294
              src/wafo/kdetools/demo.py on lines 274..274
              src/wafo/kdetools/tests/test_gridding.py on lines 35..35
              src/wafo/markov.py on lines 62..62
              src/wafo/markov.py on lines 217..217
              src/wafo/markov.py on lines 273..273
              src/wafo/markov.py on lines 400..400
              src/wafo/markov.py on lines 498..498
              src/wafo/markov.py on lines 631..631
              src/wafo/markov.py on lines 800..800
              src/wafo/markov.py on lines 1170..1170
              src/wafo/markov.py on lines 1171..1171
              src/wafo/markov.py on lines 1175..1175
              src/wafo/markov.py on lines 1176..1176
              src/wafo/markov.py on lines 1185..1185
              src/wafo/markov.py on lines 1186..1186
              src/wafo/misc.py on lines 2300..2300
              src/wafo/misc.py on lines 2471..2471
              src/wafo/misc.py on lines 2477..2477
              src/wafo/misc.py on lines 2552..2552
              src/wafo/objects.py on lines 785..785
              src/wafo/objects.py on lines 1012..1012
              src/wafo/sg_filter/demos.py on lines 123..124
              src/wafo/sg_filter/demos.py on lines 172..172
              src/wafo/sg_filter/demos.py on lines 185..185
              src/wafo/spectrum/core.py on lines 1707..1707
              src/wafo/stats/core.py on lines 965..965
              src/wafo/stats/core.py on lines 972..972
              src/wafo/stats/core.py on lines 1281..1281
              src/wafo/stats/core.py on lines 1314..1314
              src/wafo/stats/estimation.py on lines 1225..1225
              src/wafo/wavemodels.py on lines 119..119
              src/wafo/wavemodels.py on lines 220..220

              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 35 locations. Consider refactoring.
              Open

                      zx = np.hstack((z, x))
              Severity: Major
              Found in src/wafo/stats/core.py and 34 other locations - About 50 mins to fix
              src/wafo/integrate.py on lines 1160..1160
              src/wafo/integrate_oscillating.py on lines 294..294
              src/wafo/kdetools/demo.py on lines 274..274
              src/wafo/kdetools/tests/test_gridding.py on lines 35..35
              src/wafo/markov.py on lines 62..62
              src/wafo/markov.py on lines 217..217
              src/wafo/markov.py on lines 273..273
              src/wafo/markov.py on lines 400..400
              src/wafo/markov.py on lines 498..498
              src/wafo/markov.py on lines 631..631
              src/wafo/markov.py on lines 800..800
              src/wafo/markov.py on lines 1170..1170
              src/wafo/markov.py on lines 1171..1171
              src/wafo/markov.py on lines 1175..1175
              src/wafo/markov.py on lines 1176..1176
              src/wafo/markov.py on lines 1185..1185
              src/wafo/markov.py on lines 1186..1186
              src/wafo/misc.py on lines 2300..2300
              src/wafo/misc.py on lines 2471..2471
              src/wafo/misc.py on lines 2477..2477
              src/wafo/misc.py on lines 2552..2552
              src/wafo/objects.py on lines 785..785
              src/wafo/objects.py on lines 1012..1012
              src/wafo/sg_filter/demos.py on lines 123..124
              src/wafo/sg_filter/demos.py on lines 172..172
              src/wafo/sg_filter/demos.py on lines 185..185
              src/wafo/spectrum/core.py on lines 1707..1707
              src/wafo/stats/core.py on lines 965..965
              src/wafo/stats/core.py on lines 972..972
              src/wafo/stats/core.py on lines 1281..1281
              src/wafo/stats/core.py on lines 1315..1315
              src/wafo/stats/estimation.py on lines 1225..1225
              src/wafo/wavemodels.py on lines 119..119
              src/wafo/wavemodels.py on lines 220..220

              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 35 locations. Consider refactoring.
              Open

                          tb0 = np.vstack((theta00, beta00))
              Severity: Major
              Found in src/wafo/stats/core.py and 34 other locations - About 50 mins to fix
              src/wafo/integrate.py on lines 1160..1160
              src/wafo/integrate_oscillating.py on lines 294..294
              src/wafo/kdetools/demo.py on lines 274..274
              src/wafo/kdetools/tests/test_gridding.py on lines 35..35
              src/wafo/markov.py on lines 62..62
              src/wafo/markov.py on lines 217..217
              src/wafo/markov.py on lines 273..273
              src/wafo/markov.py on lines 400..400
              src/wafo/markov.py on lines 498..498
              src/wafo/markov.py on lines 631..631
              src/wafo/markov.py on lines 800..800
              src/wafo/markov.py on lines 1170..1170
              src/wafo/markov.py on lines 1171..1171
              src/wafo/markov.py on lines 1175..1175
              src/wafo/markov.py on lines 1176..1176
              src/wafo/markov.py on lines 1185..1185
              src/wafo/markov.py on lines 1186..1186
              src/wafo/misc.py on lines 2300..2300
              src/wafo/misc.py on lines 2471..2471
              src/wafo/misc.py on lines 2477..2477
              src/wafo/misc.py on lines 2552..2552
              src/wafo/objects.py on lines 785..785
              src/wafo/objects.py on lines 1012..1012
              src/wafo/sg_filter/demos.py on lines 123..124
              src/wafo/sg_filter/demos.py on lines 172..172
              src/wafo/sg_filter/demos.py on lines 185..185
              src/wafo/spectrum/core.py on lines 1707..1707
              src/wafo/stats/core.py on lines 965..965
              src/wafo/stats/core.py on lines 1281..1281
              src/wafo/stats/core.py on lines 1314..1314
              src/wafo/stats/core.py on lines 1315..1315
              src/wafo/stats/estimation.py on lines 1225..1225
              src/wafo/wavemodels.py on lines 119..119
              src/wafo/wavemodels.py on lines 220..220

              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 12 locations. Consider refactoring.
              Open

                      if X is None:
                          X = np.zeros((my, 0))
              Severity: Major
              Found in src/wafo/stats/core.py and 11 other locations - About 50 mins to fix
              src/wafo/_misc_numba.py on lines 610..610
              src/wafo/_misc_numba.py on lines 614..614
              src/wafo/markov.py on lines 344..344
              src/wafo/markov.py on lines 366..366
              src/wafo/markov.py on lines 612..612
              src/wafo/markov.py on lines 613..613
              src/wafo/markov.py on lines 614..614
              src/wafo/misc.py on lines 2691..2691
              src/wafo/stats/estimation.py on lines 1527..1527
              src/wafo/wavemodels.py on lines 102..102
              src/wafo/wavemodels.py on lines 203..203

              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 4 locations. Consider refactoring.
              Open

                              X = X[:, ix]
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 50 mins to fix
              src/wafo/objects.py on lines 787..787
              src/wafo/spectrum/models.py on lines 1558..1559
              src/wafo/spectrum/models.py on lines 2046..2047

              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

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

                      z1 = (y * ones((1, yrange))) == (
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 50 mins to fix
              src/wafo/stats/core.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 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

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

                      z = (y * ones((1, yrange))) == ((y * 0 + 1) * np.arange(ymin, ymax))
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 50 mins to fix
              src/wafo/stats/core.py on lines 947..947

              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 2 locations. Consider refactoring.
              Open

                          Xnew = Xnew[notnans, :]
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 50 mins to fix
              src/wafo/spectrum/models.py on lines 1974..1975

              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 2 locations. Consider refactoring.
              Open

                      print('Small    %d       %12.4f       %12.4f    %12.4f' %
                            (dfs, devs, localstat, localpvalue))
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 50 mins to fix
              src/wafo/spectrum/models.py on lines 1044..1044

              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 2 locations. Consider refactoring.
              Open

              def test_doctstrings():
                  #_test_dispersion_idx()
                  import doctest
                  doctest.testmod()
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 50 mins to fix
              src/wafo/spectrum/core.py on lines 4410..4412

              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 37 locations. Consider refactoring.
              Open

                  cvals = np.logspace(-1, 3, 20)
              Severity: Major
              Found in src/wafo/stats/core.py and 36 other locations - About 45 mins to fix
              src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
              src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
              src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
              src/wafo/interpolate.py on lines 1149..1149
              src/wafo/interpolate.py on lines 1150..1150
              src/wafo/interpolate.py on lines 1151..1151
              src/wafo/interpolate.py on lines 1155..1155
              src/wafo/interpolate.py on lines 1156..1156
              src/wafo/interpolate.py on lines 1157..1157
              src/wafo/interpolate.py on lines 1304..1304
              src/wafo/kdetools/demo.py on lines 31..31
              src/wafo/kdetools/demo.py on lines 68..68
              src/wafo/kdetools/kernels.py on lines 923..923
              src/wafo/objects.py on lines 415..415
              src/wafo/sg_filter/demos.py on lines 20..20
              src/wafo/sg_filter/demos.py on lines 381..381
              src/wafo/sg_filter/demos.py on lines 417..417
              src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
              src/wafo/spectrum/core.py on lines 4401..4401
              src/wafo/spectrum/models.py on lines 2087..2087
              src/wafo/spectrum/models.py on lines 2092..2092
              src/wafo/spectrum/models.py on lines 2140..2140
              src/wafo/spectrum/models.py on lines 2150..2150
              src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
              src/wafo/stats/core.py on lines 1427..1427
              src/wafo/tests/test_gaussian.py on lines 153..153
              src/wafo/tests/test_misc.py on lines 112..112
              src/wafo/tests/test_misc.py on lines 389..389
              src/wafo/tests/test_misc.py on lines 452..452
              src/wafo/tests/test_misc.py on lines 510..510
              src/wafo/tests/test_misc.py on lines 520..520
              src/wafo/tests/test_misc.py on lines 530..530
              src/wafo/tests/test_misc.py on lines 535..535
              src/wafo/tests/test_misc.py on lines 545..545
              src/wafo/tests/test_misc.py on lines 555..555
              src/wafo/tests/test_misc.py on lines 568..568

              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 37 locations. Consider refactoring.
              Open

                  cvals = np.logspace(-1, 1, 5)
              Severity: Major
              Found in src/wafo/stats/core.py and 36 other locations - About 45 mins to fix
              src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
              src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
              src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
              src/wafo/interpolate.py on lines 1149..1149
              src/wafo/interpolate.py on lines 1150..1150
              src/wafo/interpolate.py on lines 1151..1151
              src/wafo/interpolate.py on lines 1155..1155
              src/wafo/interpolate.py on lines 1156..1156
              src/wafo/interpolate.py on lines 1157..1157
              src/wafo/interpolate.py on lines 1304..1304
              src/wafo/kdetools/demo.py on lines 31..31
              src/wafo/kdetools/demo.py on lines 68..68
              src/wafo/kdetools/kernels.py on lines 923..923
              src/wafo/objects.py on lines 415..415
              src/wafo/sg_filter/demos.py on lines 20..20
              src/wafo/sg_filter/demos.py on lines 381..381
              src/wafo/sg_filter/demos.py on lines 417..417
              src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
              src/wafo/spectrum/core.py on lines 4401..4401
              src/wafo/spectrum/models.py on lines 2087..2087
              src/wafo/spectrum/models.py on lines 2092..2092
              src/wafo/spectrum/models.py on lines 2140..2140
              src/wafo/spectrum/models.py on lines 2150..2150
              src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
              src/wafo/stats/core.py on lines 1446..1446
              src/wafo/tests/test_gaussian.py on lines 153..153
              src/wafo/tests/test_misc.py on lines 112..112
              src/wafo/tests/test_misc.py on lines 389..389
              src/wafo/tests/test_misc.py on lines 452..452
              src/wafo/tests/test_misc.py on lines 510..510
              src/wafo/tests/test_misc.py on lines 520..520
              src/wafo/tests/test_misc.py on lines 530..530
              src/wafo/tests/test_misc.py on lines 535..535
              src/wafo/tests/test_misc.py on lines 545..545
              src/wafo/tests/test_misc.py on lines 555..555
              src/wafo/tests/test_misc.py on lines 568..568

              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 17 locations. Consider refactoring.
              Open

                  o_order = zeros(num_y, dtype=int)
              Severity: Major
              Found in src/wafo/stats/core.py and 16 other locations - About 45 mins to fix
              src/wafo/containers.py on lines 611..611
              src/wafo/covariance/core.py on lines 632..632
              src/wafo/integrate.py on lines 1197..1197
              src/wafo/integrate.py on lines 1198..1198
              src/wafo/integrate.py on lines 1199..1199
              src/wafo/integrate.py on lines 1402..1402
              src/wafo/objects.py on lines 1655..1655
              src/wafo/sg_filter/demos.py on lines 37..37
              src/wafo/sg_filter/demos.py on lines 400..400
              src/wafo/spectrum/core.py on lines 1428..1428
              src/wafo/spectrum/core.py on lines 1429..1429
              src/wafo/stats/core.py on lines 624..624
              src/wafo/stats/estimation.py on lines 573..573
              src/wafo/stats/estimation.py on lines 578..578
              src/wafo/stats/estimation.py on lines 1399..1399
              src/wafo/transform/estimation.py on lines 444..444

              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 17 locations. Consider refactoring.
              Open

                  is_too_close = zeros(num_y, dtype=bool)
              Severity: Major
              Found in src/wafo/stats/core.py and 16 other locations - About 45 mins to fix
              src/wafo/containers.py on lines 611..611
              src/wafo/covariance/core.py on lines 632..632
              src/wafo/integrate.py on lines 1197..1197
              src/wafo/integrate.py on lines 1198..1198
              src/wafo/integrate.py on lines 1199..1199
              src/wafo/integrate.py on lines 1402..1402
              src/wafo/objects.py on lines 1655..1655
              src/wafo/sg_filter/demos.py on lines 37..37
              src/wafo/sg_filter/demos.py on lines 400..400
              src/wafo/spectrum/core.py on lines 1428..1428
              src/wafo/spectrum/core.py on lines 1429..1429
              src/wafo/stats/core.py on lines 621..621
              src/wafo/stats/estimation.py on lines 573..573
              src/wafo/stats/estimation.py on lines 578..578
              src/wafo/stats/estimation.py on lines 1399..1399
              src/wafo/transform/estimation.py on lines 444..444

              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 12 locations. Consider refactoring.
              Open

                          eps = np.finfo(float).eps
              Severity: Major
              Found in src/wafo/stats/core.py and 11 other locations - About 45 mins to fix
              src/wafo/integrate.py on lines 16..16
              src/wafo/kdetools/kdetools.py on lines 30..30
              src/wafo/kdetools/kdetools.py on lines 32..32
              src/wafo/kdetools/kdetools.py on lines 33..33
              src/wafo/kdetools/kdetools.py on lines 426..426
              src/wafo/sg_filter/_core.py on lines 1138..1138
              src/wafo/spectrum/core.py on lines 51..51
              src/wafo/spectrum/core.py on lines 52..52
              src/wafo/stats/core.py on lines 18..18
              src/wafo/tests/test_integrate_oscillating.py on lines 19..19
              src/wafo/transform/models.py on lines 17..17

              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 12 locations. Consider refactoring.
              Open

              _EPS = np.finfo(float).eps
              Severity: Major
              Found in src/wafo/stats/core.py and 11 other locations - About 45 mins to fix
              src/wafo/integrate.py on lines 16..16
              src/wafo/kdetools/kdetools.py on lines 30..30
              src/wafo/kdetools/kdetools.py on lines 32..32
              src/wafo/kdetools/kdetools.py on lines 33..33
              src/wafo/kdetools/kdetools.py on lines 426..426
              src/wafo/sg_filter/_core.py on lines 1138..1138
              src/wafo/spectrum/core.py on lines 51..51
              src/wafo/spectrum/core.py on lines 52..52
              src/wafo/stats/core.py on lines 1269..1269
              src/wafo/tests/test_integrate_oscillating.py on lines 19..19
              src/wafo/transform/models.py on lines 17..17

              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 7 locations. Consider refactoring.
              Open

                  mrl = reslife(R, nu=20)
              Severity: Major
              Found in src/wafo/stats/core.py and 6 other locations - About 45 mins to fix
              src/wafo/interpolate.py on lines 660..660
              src/wafo/kdetools/kdetools.py on lines 920..920
              src/wafo/kdetools/kdetools.py on lines 925..925
              src/wafo/kdetools/kdetools.py on lines 926..926
              src/wafo/kdetools/kernels.py on lines 642..642
              src/wafo/tests/test_misc.py on lines 310..310

              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

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

                  di_low = _invchi2(1 - alpha / 2, M - 1) / (M - 1)
              Severity: Major
              Found in src/wafo/stats/core.py and 2 other locations - About 45 mins to fix
              src/wafo/kdetools/kdetools.py on lines 1051..1051
              src/wafo/objects.py on lines 1538..1538

              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 7 locations. Consider refactoring.
              Open

                  nc = iy[1::2]
              Severity: Major
              Found in src/wafo/stats/core.py and 6 other locations - About 45 mins to fix
              src/wafo/misc.py on lines 1196..1197
              src/wafo/misc.py on lines 2685..2685
              src/wafo/objects.py on lines 1808..1808
              src/wafo/objects.py on lines 1901..1901
              src/wafo/spectrum/core.py on lines 2639..2639
              src/wafo/spectrum/core.py on lines 2873..2873

              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 5 locations. Consider refactoring.
              Open

                      beta00 = np.zeros((nx,))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 45 mins to fix
              src/wafo/integrate_oscillating.py on lines 385..385
              src/wafo/kdetools/gridding.py on lines 234..234
              src/wafo/kdetools/kdetools.py on lines 764..764
              src/wafo/kdetools/kdetools.py on lines 778..778

              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

                  if np.any(is_too_small):
                      ix_e = _remove_index_to_data_too_close_to_each_other(ix_e, is_too_small, di_e, ti_e, tmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 5 other locations - About 45 mins to fix
              src/wafo/_misc_numba.py on lines 616..616
              src/wafo/gaussian.py on lines 382..382
              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

              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 5 locations. Consider refactoring.
              Open

                  invprb[nan_mask] = np.nan
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 45 mins to fix
              src/wafo/kdetools/kdetools.py on lines 1195..1195
              src/wafo/misc.py on lines 2108..2108
              src/wafo/stats/_continuous_distns.py on lines 3750..3750
              src/wafo/stats/core.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 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 5 locations. Consider refactoring.
              Open

                      dlogp = np.hstack((((v * z) - (v1 * z1)), ((v - v1) * x)))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 45 mins to fix
              src/wafo/_misc_numba.py on lines 319..319
              src/wafo/objects.py on lines 318..318
              src/wafo/stats/_continuous_distns.py on lines 3903..3903
              src/wafo/stats/estimation.py on lines 146..146

              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 5 locations. Consider refactoring.
              Open

                      if p != nx:
                          raise ValueError('Number of covariates must match the number' +
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 45 mins to fix
              src/wafo/spectrum/models.py on lines 576..577
              src/wafo/spectrum/models.py on lines 616..617
              src/wafo/spectrum/models.py on lines 1964..1965
              src/wafo/stats/estimation.py on lines 293..294

              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 5 locations. Consider refactoring.
              Open

                  inv_period[nan_mask] = np.nan
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 45 mins to fix
              src/wafo/kdetools/kdetools.py on lines 1195..1195
              src/wafo/misc.py on lines 2108..2108
              src/wafo/stats/_continuous_distns.py on lines 3750..3750
              src/wafo/stats/core.py on lines 498..498

              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

                                  (yup[:, i], muup[:, i] - mulo[:, i - 1])).max(axis=0)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 45 mins to fix
              src/wafo/markov.py on lines 29..29
              src/wafo/markov.py on lines 213..213
              src/wafo/markov.py on lines 213..213

              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

                      self.df = max(my - nx - nz, 0)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 45 mins to fix
              src/wafo/gaussian.py on lines 336..336
              src/wafo/markov.py on lines 654..654
              src/wafo/stats/core.py on lines 1034..1034

              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

                      R2adj = max(1 - (1 - R2) * (my - 1) / (my - nx - nz - 1), 0)
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 45 mins to fix
              src/wafo/gaussian.py on lines 336..336
              src/wafo/markov.py on lines 654..654
              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 2 locations. Consider refactoring.
              Open

                  cdf = edf(z[c <= z], method=method)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 45 mins to fix
              src/wafo/spectrum/models.py on lines 1901..1901

              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

                          iy = np.flatnonzero(s <= tol)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 45 mins to fix
              src/wafo/stats/_continuous_distns.py on lines 2962..2962

              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

                  if plotflag:
                      res.plot(di)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 45 mins to fix
              src/wafo/graphutil.py on lines 56..58

              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

                      e_cdf = arange(1, n + 1) / n
              Severity: Major
              Found in src/wafo/stats/core.py and 10 other locations - About 40 mins to fix
              src/wafo/covariance/estimation.py on lines 165..165
              src/wafo/integrate.py on lines 247..247
              src/wafo/integrate.py on lines 340..340
              src/wafo/integrate.py on lines 506..506
              src/wafo/integrate.py on lines 558..558
              src/wafo/integrate.py on lines 611..611
              src/wafo/spectrum/core.py on lines 834..834
              src/wafo/spectrum/core.py on lines 963..963
              src/wafo/stats/_continuous_distns.py on lines 7492..7492
              src/wafo/stats/core.py on lines 94..94

              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 10 locations. Consider refactoring.
              Open

                  I = findpot(data, t, ymin, tmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 9 other locations - About 40 mins to fix
              src/wafo/integrate.py on lines 1319..1319
              src/wafo/kdetools/kernels.py on lines 926..926
              src/wafo/kdetools/kernels.py on lines 929..929
              src/wafo/markov.py on lines 407..407
              src/wafo/misc.py on lines 2609..2609
              src/wafo/stats/_distn_infrastructure.py on lines 107..107
              src/wafo/stats/core.py on lines 440..440
              src/wafo/stats/core.py on lines 1372..1372
              src/wafo/tests/test_padua.py on lines 80..80

              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 10 locations. Consider refactoring.
              Open

                  Ie = findpot(yp, tp, ymin, tmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 9 other locations - About 40 mins to fix
              src/wafo/integrate.py on lines 1319..1319
              src/wafo/kdetools/kernels.py on lines 926..926
              src/wafo/kdetools/kernels.py on lines 929..929
              src/wafo/markov.py on lines 407..407
              src/wafo/misc.py on lines 2609..2609
              src/wafo/stats/_distn_infrastructure.py on lines 107..107
              src/wafo/stats/core.py on lines 440..440
              src/wafo/stats/core.py on lines 1370..1370
              src/wafo/tests/test_padua.py on lines 80..80

              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 10 locations. Consider refactoring.
              Open

                  i = findpot(data, t, thresh, tmin)
              Severity: Major
              Found in src/wafo/stats/core.py and 9 other locations - About 40 mins to fix
              src/wafo/integrate.py on lines 1319..1319
              src/wafo/kdetools/kernels.py on lines 926..926
              src/wafo/kdetools/kernels.py on lines 929..929
              src/wafo/markov.py on lines 407..407
              src/wafo/misc.py on lines 2609..2609
              src/wafo/stats/_distn_infrastructure.py on lines 107..107
              src/wafo/stats/core.py on lines 1370..1370
              src/wafo/stats/core.py on lines 1372..1372
              src/wafo/tests/test_padua.py on lines 80..80

              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 11 locations. Consider refactoring.
              Open

                      e_cdf = arange(1, n + 1) / (n + 1)
              Severity: Major
              Found in src/wafo/stats/core.py and 10 other locations - About 40 mins to fix
              src/wafo/covariance/estimation.py on lines 165..165
              src/wafo/integrate.py on lines 247..247
              src/wafo/integrate.py on lines 340..340
              src/wafo/integrate.py on lines 506..506
              src/wafo/integrate.py on lines 558..558
              src/wafo/integrate.py on lines 611..611
              src/wafo/spectrum/core.py on lines 834..834
              src/wafo/spectrum/core.py on lines 963..963
              src/wafo/stats/_continuous_distns.py on lines 7492..7492
              src/wafo/stats/core.py on lines 92..92

              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 7 locations. Consider refactoring.
              Open

                      print('Full     %d       %12.4f' % (dfL, devL))
              Severity: Major
              Found in src/wafo/stats/core.py and 6 other locations - About 40 mins to fix
              src/wafo/doc/tutorial_scripts/chapter2.py on lines 56..56
              src/wafo/spectrum/core.py on lines 2969..2971
              src/wafo/spectrum/models.py on lines 1045..1045
              src/wafo/spectrum/models.py on lines 1046..1046
              src/wafo/spectrum/models.py on lines 1047..1047
              src/wafo/spectrum/models.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 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 5 locations. Consider refactoring.
              Open

                              vareta = zeros((n, nz))
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 40 mins to fix
              src/wafo/misc.py on lines 2895..2895
              src/wafo/misc.py on lines 2896..2896
              src/wafo/spectrum/core.py on lines 1411..1411
              src/wafo/spectrum/core.py on lines 3488..3491

              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

                  Ie = findpot(data, t, 0, 5)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 40 mins to fix
              src/wafo/wave_theory/core.py on lines 576..576

              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

                  pool = zeros((num_y, 2))
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 40 mins to fix
              src/wafo/stats/core.py on lines 1260..1260

              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

                          localpvalue = 1 - _cdfchi2(localstat, pmq)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 40 mins to fix
              src/wafo/containers.py on lines 527..527

              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

                      one = ones((n, 1))
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 40 mins to fix
              src/wafo/stats/core.py on lines 626..626

              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

                      is_too_close[i] = np.any((pool[:k, 0] <= ti) & (ti <= pool[:k, 1]))
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 40 mins to fix
              src/wafo/stats/core.py on lines 630..630

              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

                      r = np.corrcoef(np.hstack((y, mu)).T)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 40 mins to fix
              src/wafo/kdetools/kdetools.py on lines 1142..1142

              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 13 locations. Consider refactoring.
              Open

                  alpha2 = alpha / 2
              Severity: Major
              Found in src/wafo/stats/core.py and 12 other locations - About 35 mins to fix
              src/wafo/integrate.py on lines 1213..1213
              src/wafo/integrate_oscillating.py on lines 304..304
              src/wafo/kdetools/demo.py on lines 32..32
              src/wafo/kdetools/kernels.py on lines 1110..1110
              src/wafo/sg_filter/demos.py on lines 313..313
              src/wafo/sg_filter/demos.py on lines 316..316
              src/wafo/stats/_continuous_distns.py on lines 4978..4978
              src/wafo/stats/_continuous_distns.py on lines 6859..6859
              src/wafo/stats/estimation.py on lines 318..318
              src/wafo/transform/models.py on lines 206..206
              src/wafo/transform/models.py on lines 207..207
              src/wafo/transform/models.py on lines 324..324

              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

                                  ib[0] = i
              Severity: Major
              Found in src/wafo/stats/core.py and 7 other locations - About 35 mins to fix
              src/wafo/misc.py on lines 856..856
              src/wafo/spectrum/core.py on lines 1439..1439
              src/wafo/spectrum/core.py on lines 2063..2063
              src/wafo/spectrum/core.py on lines 2065..2065
              src/wafo/spectrum/core.py on lines 2135..2135
              src/wafo/spectrum/core.py on lines 2138..2138
              src/wafo/stats/_continuous_distns.py on lines 7034..7035

              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 6 locations. Consider refactoring.
              Open

                      self.eta = _logit(gammai)
              Severity: Major
              Found in src/wafo/stats/core.py and 5 other locations - About 35 mins to fix
              src/wafo/containers.py on lines 85..85
              src/wafo/containers.py on lines 259..260
              src/wafo/containers.py on lines 249..265
              src/wafo/kdetools/kdetools.py on lines 82..85
              src/wafo/win32_utils.py on lines 80..80

              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 5 locations. Consider refactoring.
              Open

                  if plotflag:
                      res.plot()
              Severity: Major
              Found in src/wafo/stats/core.py and 4 other locations - About 35 mins to fix
              src/wafo/spectrum/models.py on lines 249..250
              src/wafo/spectrum/models.py on lines 548..549
              src/wafo/spectrum/models.py on lines 904..905
              src/wafo/spectrum/models.py on lines 1189..1190

              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

                      i_ok, = where(1 - is_too_close)
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 35 mins to fix
              src/wafo/gaussian.py on lines 928..928
              src/wafo/sg_filter/_core.py on lines 413..413

              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

              def dispersion_idx(
                  data, t=None, u=None, umin=None, umax=None, nu=None, nmin=10, tb=1,
                      alpha=0.05, plotflag=False):
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 35 mins to fix
              src/wafo/_misc_numba.py on lines 436..436
              src/wafo/wave_theory/core.py on lines 272..273

              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

                      lambda_ = excess.sum() / M
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 35 mins to fix
              src/wafo/kdetools/gridding.py on lines 236..236
              src/wafo/stats/core.py on lines 376..376

              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

                  if len(di_e) <= 1:
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 35 mins to fix
              src/wafo/gaussian.py on lines 891..891
              src/wafo/sg_filter/_core.py on lines 1186..1186

              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

                      di[ix] = occ.var() / lambda_
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 35 mins to fix
              src/wafo/kdetools/gridding.py on lines 236..236
              src/wafo/stats/core.py on lines 372..372

              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

                  ix_e, = where(data > thresh)
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 35 mins to fix
              src/wafo/doc/tutorial_scripts/chapter2.py on lines 185..185
              src/wafo/spectrum/tests/test_specdata1d.py on lines 107..107

              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

                  is_too_small = (dt <= tmin)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 35 mins to fix
              src/wafo/stats/_continuous_distns.py on lines 3943..3943

              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

                  def fit(self, y, X=None, theta0=None, beta0=None):
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 35 mins to fix
              src/wafo/kdetools/kdetools.py on lines 61..61

              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

                      excess = (d > tresh)
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 35 mins to fix
              src/wafo/objects.py on lines 265..265

              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

                                  object2.family != self.family or object2.link != self.link):
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 35 mins to fix
              src/wafo/stats/core.py on lines 1128..1128

              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

                      ei = min(1, 2 * t.mean() ** 2 / ((t ** 2).mean()))
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 35 mins to fix
              src/wafo/sg_filter/_core.py on lines 267..267

              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

                      _mz, nz = z.shape
              Severity: Major
              Found in src/wafo/stats/core.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/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 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

                      my, _ny = y.shape
              Severity: Major
              Found in src/wafo/stats/core.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/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 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

                      _mx, nx = X.shape
              Severity: Major
              Found in src/wafo/stats/core.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/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 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

                      [n, p] = Xnew.shape
              Severity: Major
              Found in src/wafo/stats/core.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/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 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

                  t, data = xn.T
              Severity: Major
              Found in src/wafo/stats/core.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/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

              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 4 locations. Consider refactoring.
              Open

              def decluster(data, t=None, thresh=None, tmin=1):
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 30 mins to fix
              src/wafo/sg_filter/demos.py on lines 88..88
              src/wafo/spectrum/models.py on lines 132..132
              src/wafo/stats/core.py on lines 541..541

              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 4 locations. Consider refactoring.
              Open

              from numpy import inf, atleast_1d, nan, sqrt, vstack, ones, where, zeros
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 30 mins to fix
              src/wafo/objects.py on lines 18..18
              src/wafo/spectrum/core.py on lines 20..20
              src/wafo/spectrum/tests/test_models.py on lines 5..5

              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 4 locations. Consider refactoring.
              Open

              def findpot(data, t=None, thresh=None, tmin=1):
              Severity: Major
              Found in src/wafo/stats/core.py and 3 other locations - About 30 mins to fix
              src/wafo/sg_filter/demos.py on lines 88..88
              src/wafo/spectrum/models.py on lines 132..132
              src/wafo/stats/core.py on lines 401..401

              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 3 locations. Consider refactoring.
              Open

                  return strftime("%a, %d %b %Y %H:%M:%S", gmtime())
              Severity: Minor
              Found in src/wafo/stats/core.py and 2 other locations - About 30 mins to fix
              src/wafo/misc.py on lines 437..438
              src/wafo/misc.py on lines 439..439

              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 2 locations. Consider refactoring.
              Open

                  plt.plot(x, mu, 'g', x, plo, 'r:', x, pup, 'r:')
              Severity: Minor
              Found in src/wafo/stats/core.py and 1 other location - About 30 mins to fix
              src/wafo/sg_filter/demos.py on lines 468..470

              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

              There are no issues that match your filters.

              Category
              Status