wafo-project/pywafo

View on GitHub
src/wafo/sg_filter/_core.py

Summary

Maintainability
F
1 wk
Test Coverage

Kalman has 25 functions (exceeds 20 allowed). Consider refactoring.
Open

class Kalman(object):

    """
    Kalman filter object - updates a system state vector estimate based upon an
              observation, using a discrete Kalman filter.
Severity: Minor
Found in src/wafo/sg_filter/_core.py - About 2 hrs to fix

    Cyclomatic complexity is too high in method _smooth. (6)
    Open

        def _smooth(self, z, s):
            auto_smooth = self.auto_smooth
            norm = linalg.norm
            y = self.y
            Wtot = self.Wtot
    Severity: Minor
    Found in src/wafo/sg_filter/_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 smoothn has 8 arguments (exceeds 7 allowed). Consider refactoring.
    Open

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

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

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

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

            def __init__(self, y, z0, weightstr, weights, s, robust, maxiter, tolz):
        Severity: Major
        Found in src/wafo/sg_filter/_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):
            ...
        

        Method "__init__" has 8 parameters, which is greater than the 7 authorized.
        Open

            def __init__(self, n, degree=1, diff_order=0, delta=1.0, axis=-1,
                         mode='interp', cval=0.0):
        Severity: Major
        Found in src/wafo/sg_filter/_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):
            ...
        

        Method "__init__" has 8 parameters, which is greater than the 7 authorized.
        Open

            def __init__(self, R, x=None, P=None, A=None, B=0, Q=None, H=None):
        Severity: Major
        Found in src/wafo/sg_filter/_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):
            ...
        

        Method "__init__" has 8 parameters, which is greater than the 7 authorized.
        Open

            def __init__(self, s=None, weight=None, robust=False, z0=None, tolz=1e-3,
                         maxiter=100, fulloutput=False):
        Severity: Major
        Found in src/wafo/sg_filter/_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):
            ...
        

        Function "smoothn" has 8 parameters, which is greater than the 7 authorized.
        Open

        def smoothn(data, s=None, weight=None, robust=False, z0=None, tolz=1e-3,
                    maxiter=100, fulloutput=False):
        Severity: Major
        Found in src/wafo/sg_filter/_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

                # return np.dot(np.eye(len(P)) - K * self.H, P)
        Severity: Major
        Found in src/wafo/sg_filter/_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

                # return np.linalg.solve(PHT, innovation_covariance)
        Severity: Major
        Found in src/wafo/sg_filter/_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

            # fun = lambda x : score_fun(x, S2, dcty2)
        Severity: Major
        Found in src/wafo/sg_filter/_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

        # noise = np.random.randn(2**8)/10
        Severity: Major
        Found in src/wafo/sg_filter/_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

                    # z = shiftdim(z,1);
        Severity: Major
        Found in src/wafo/sg_filter/_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

                np.putmask(YY, outliers, Y0)        # YY[outliers] = Y0[outliers]
        Severity: Major
        Found in src/wafo/sg_filter/_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"

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

            def __init__(self, s=None, weight=None, robust=False, z0=None, tolz=1e-3,
                         maxiter=100, fulloutput=False):
                self.s = s
                self.weight = weight
                self.robust = robust
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 3 hrs to fix
        src/wafo/covariance/estimation.py on lines 65..73

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 50.

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

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

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

            M = 1.0 - 1.0 / (1 + 10 ** Lopt * S2)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 2 hrs to fix
        src/wafo/sg_filter/_core.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 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

                M = 1 - 1. / (1 + 10 ** L * S2)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 2 hrs to fix
        src/wafo/sg_filter/_core.py on lines 270..270

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            def _set_A(self, n):
                if self.A is None:
                    self.A = np.eye(n)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 2 hrs to fix
        src/wafo/sg_filter/_core.py on lines 967..969

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 32.

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

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

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 _set_H(self, n):
                if self.H is None:
                    self.H = np.eye(n)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 2 hrs to fix
        src/wafo/sg_filter/_core.py on lines 943..945

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 32.

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

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

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 __init__(self, dx=None, t=3, adaptive=None, fulloutput=False):
                self.dx = dx
                self.t = t
                self.adaptive = adaptive
                self.fulloutput = fulloutput
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 2 hrs to fix
        src/wafo/containers.py on lines 276..280

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 29.

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

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

        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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

                            S0Rel = np.abs((S0Tmp[j - 1] - S0Tmp[j]) /
                                           (S0Tmp[j - 1] + S0Tmp[j]) / 2)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/spectrum/core.py on lines 1961..1961

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
        Open

            @Q.setter
            def Q(self, q):
                self._q = self._none_or_atleast_2d(q)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 939..941
        src/wafo/sg_filter/_core.py on lines 963..965
        src/wafo/sg_filter/_core.py on lines 975..977

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 24.

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

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

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

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

        Refactorings

        Further Reading

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

            @P.setter
            def P(self, p):
                self._p = self._none_or_atleast_2d(p)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 939..941
        src/wafo/sg_filter/_core.py on lines 951..953
        src/wafo/sg_filter/_core.py on lines 963..965

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 24.

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

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

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

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

        Refactorings

        Further Reading

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

            @A.setter
            def A(self, a):
                self._a = self._none_or_atleast_2d(a)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 951..953
        src/wafo/sg_filter/_core.py on lines 963..965
        src/wafo/sg_filter/_core.py on lines 975..977

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 24.

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

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

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

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

        Refactorings

        Further Reading

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

            @H.setter
            def H(self, h):
                self._h = self._none_or_atleast_2d(h)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 939..941
        src/wafo/sg_filter/_core.py on lines 951..953
        src/wafo/sg_filter/_core.py on lines 975..977

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 24.

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

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

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

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

        Refactorings

        Further Reading

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

                    Y0[i] = Y0Tmp[j - 2]
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 1162..1162

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 23.

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

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

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

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

        Refactorings

        Further Reading

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

                if x is None:
                    x = range(len(Y))
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/gaussian.py on lines 533..534

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    S0[i] = S0Tmp[j - 2]
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 1161..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

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

        def _assert(cond, msg):
            if not cond:
                raise ValueError(msg)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 11 other locations - About 1 hr to fix
        src/wafo/integrate.py on lines 24..26
        src/wafo/integrate_oscillating.py on lines 25..27
        src/wafo/interpolate.py on lines 17..19
        src/wafo/kdetools/gridding.py on lines 13..15
        src/wafo/kdetools/kdetools.py on lines 36..38
        src/wafo/kdetools/kernels.py on lines 22..24
        src/wafo/stats/estimation.py on lines 51..53
        src/wafo/stats/estimation.py on lines 56..58
        src/wafo/stats/estimation.py on lines 61..63
        src/wafo/transform/models.py on lines 38..40
        src/wafo/wave_theory/dispersion_relation.py on lines 17..19

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
        Open

                S0Tmp = np.nan * np.zeros(Y.shape)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 1146..1146
        src/wafo/sg_filter/_core.py on lines 1173..1173
        src/wafo/sg_filter/_core.py on lines 1174..1174

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 21.

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

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

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

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

        Refactorings

        Further Reading

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

            noisevar = (dcty2 * M ** 2).mean()
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.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 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 4 locations. Consider refactoring.
        Open

                S0 = np.nan * np.zeros(Y.shape)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 1146..1146
        src/wafo/sg_filter/_core.py on lines 1147..1147
        src/wafo/sg_filter/_core.py on lines 1174..1174

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 21.

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

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

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

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

        Refactorings

        Further Reading

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

                noisevar = (dcty2 * M ** 2).mean()
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 271..271

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
        Open

                Y0Tmp = np.nan * np.zeros(Y.shape)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 1147..1147
        src/wafo/sg_filter/_core.py on lines 1173..1173
        src/wafo/sg_filter/_core.py on lines 1174..1174

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
        Open

                Y0 = np.nan * np.zeros(Y.shape)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 1146..1146
        src/wafo/sg_filter/_core.py on lines 1147..1147
        src/wafo/sg_filter/_core.py on lines 1173..1173

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                A[0, 0] = A[-1, -1] = 1 + w
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 767..767

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                A[1, 1] = A[-2, -2] = 1 + 5 * w
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 766..766

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 21.

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

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

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

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

        Refactorings

        Further Reading

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

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

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 20.

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

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

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

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

        Refactorings

        Further Reading

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

                DX = 2 * np.median(np.diff(X))
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 1 hr to fix
        src/wafo/markov.py on lines 672..672
        src/wafo/sg_filter/_core.py on lines 1200..1200
        src/wafo/stats/_continuous_distns.py on lines 4490..4490
        src/wafo/stats/_continuous_distns.py on lines 4666..4666

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                dx = 3 * np.median(np.diff(X)) if self.dx is None else self.dx
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 1 hr to fix
        src/wafo/markov.py on lines 672..672
        src/wafo/sg_filter/_core.py on lines 1166..1166
        src/wafo/stats/_continuous_distns.py on lines 4490..4490
        src/wafo/stats/_continuous_distns.py on lines 4666..4666

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    return (1 - (u / c) ** 2) ** 2 * ((u / c) < 1)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/kdetools/kernels.py on lines 368..368

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        def smoothn(data, s=None, weight=None, robust=False, z0=None, tolz=1e-3,
                    maxiter=100, fulloutput=False):
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 516..517
        src/wafo/stats/core.py on lines 157..158

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            @weight.setter
            def weight(self, weight):
                self._weight = weight
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/kdetools/kdetools.py on lines 73..76

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 18.

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

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

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

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

        Refactorings

        Further Reading

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

                elif self.adaptive is None:
                    Y0, S0, ADX = self._fixed(Y, X, dx)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 12 other locations - About 1 hr to fix
        src/wafo/covariance/core.py on lines 604..604
        src/wafo/covariance/core.py on lines 643..643
        src/wafo/gaussian.py on lines 846..846
        src/wafo/interpolate.py on lines 560..560
        src/wafo/interpolate.py on lines 615..615
        src/wafo/misc.py on lines 2585..2585
        src/wafo/sg_filter/_core.py on lines 1188..1191
        src/wafo/sg_filter/_core.py on lines 1203..1203
        src/wafo/stats/_continuous_distns.py on lines 4632..4632
        src/wafo/stats/_continuous_distns.py on lines 4678..4678
        src/wafo/wave_theory/core.py on lines 329..329
        src/wafo/wave_theory/dispersion_relation.py on lines 147..147

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 17.

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

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

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

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

        Refactorings

        Further Reading

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

                Y0, S0, ADX = self._filter(Y, X, dx)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 12 other locations - About 1 hr to fix
        src/wafo/covariance/core.py on lines 604..604
        src/wafo/covariance/core.py on lines 643..643
        src/wafo/gaussian.py on lines 846..846
        src/wafo/interpolate.py on lines 560..560
        src/wafo/interpolate.py on lines 615..615
        src/wafo/misc.py on lines 2585..2585
        src/wafo/sg_filter/_core.py on lines 1188..1189
        src/wafo/sg_filter/_core.py on lines 1188..1191
        src/wafo/stats/_continuous_distns.py on lines 4632..4632
        src/wafo/stats/_continuous_distns.py on lines 4678..4678
        src/wafo/wave_theory/core.py on lines 329..329
        src/wafo/wave_theory/dispersion_relation.py on lines 147..147

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 17.

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

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

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

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

        Refactorings

        Further Reading

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

                RSS = linalg.norm(residual)**2  # Residual sum-of-squares
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 1 hr to fix
        src/wafo/integrate.py on lines 743..743
        src/wafo/tests/test_integrate_oscillating.py on lines 302..302
        src/wafo/tests/test_integrate_oscillating.py on lines 309..309
        src/wafo/tests/test_integrate_oscillating.py on lines 346..346

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                window_length = 2 * n + 1
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/integrate.py on lines 233..233
        src/wafo/spectrum/models.py on lines 1248..1248
        src/wafo/stats/_continuous_distns.py on lines 1846..1846

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                Lambda = -2 * (d - Lambda)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 1 hr to fix
        src/wafo/_misc_numba.py on lines 396..396
        src/wafo/misc.py on lines 1185..1185

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                return (((1 + sqrt(1 + 8 * h)) / 4. / h) ** 2 - 1) / 16
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 440..440
        src/wafo/transform/models.py on lines 178..178

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                h = sqrt(1 + 16 * s)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 316..316
        src/wafo/transform/models.py on lines 178..178

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                h_max = 0.99 ** (2. / n)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 328..328

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                return np.dot(np.dot(A, P), A.T) + self.Q
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/demos.py on lines 131..131

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                h_min = 1e-6 ** (2. / n)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/_core.py on lines 329..329

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                weights[np.isnan(weights)] = 0
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/stats/_continuous_distns.py on lines 6339..6339

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 10 locations. Consider refactoring.
        Open

            def __call__(self, signal):
                return self.smooth(signal)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 9 other locations - About 1 hr to fix
        src/wafo/stats/_continuous_distns.py on lines 226..227
        src/wafo/stats/_continuous_distns.py on lines 229..230
        src/wafo/stats/_continuous_distns.py on lines 232..233
        src/wafo/stats/_continuous_distns.py on lines 235..236
        src/wafo/stats/_continuous_distns.py on lines 2531..2532
        src/wafo/stats/_continuous_distns.py on lines 4873..4874
        src/wafo/stats/_continuous_distns.py on lines 4876..4877
        src/wafo/stats/_continuous_distns.py on lines 5424..5425
        src/wafo/stats/_continuous_distns.py on lines 7001..7002

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                self.W = self._normalized_weights(weights, self.is_finite)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 1 hr to fix
        src/wafo/interpolate.py on lines 996..996
        src/wafo/interpolate.py on lines 997..997
        src/wafo/interpolate.py on lines 998..998

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    z, L = distance_transform_edt(notI, return_indices=True)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 1 hr to fix
        src/wafo/sg_filter/demos.py on lines 421..421

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 11 locations. Consider refactoring.
        Open

                X = np.atleast_1d(x).ravel()
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 10 other locations - About 55 mins to fix
        src/wafo/_misc_numba.py on lines 606..606
        src/wafo/_misc_numba.py on lines 613..613
        src/wafo/kdetools/gridding.py on lines 340..340
        src/wafo/misc.py on lines 1318..1318
        src/wafo/misc.py on lines 1392..1392
        src/wafo/misc.py on lines 1713..1713
        src/wafo/objects.py on lines 2562..2562
        src/wafo/sg_filter/_core.py on lines 772..772
        src/wafo/sg_filter/_core.py on lines 1195..1195
        src/wafo/stats/_continuous_distns.py on lines 722..722

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                Y = np.atleast_1d(y).ravel()
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 10 other locations - About 55 mins to fix
        src/wafo/_misc_numba.py on lines 606..606
        src/wafo/_misc_numba.py on lines 613..613
        src/wafo/kdetools/gridding.py on lines 340..340
        src/wafo/misc.py on lines 1318..1318
        src/wafo/misc.py on lines 1392..1392
        src/wafo/misc.py on lines 1713..1713
        src/wafo/objects.py on lines 2562..2562
        src/wafo/sg_filter/_core.py on lines 772..772
        src/wafo/sg_filter/_core.py on lines 1198..1198
        src/wafo/stats/_continuous_distns.py on lines 722..722

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                x = np.atleast_1d(x).flatten()
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 10 other locations - About 55 mins to fix
        src/wafo/_misc_numba.py on lines 606..606
        src/wafo/_misc_numba.py on lines 613..613
        src/wafo/kdetools/gridding.py on lines 340..340
        src/wafo/misc.py on lines 1318..1318
        src/wafo/misc.py on lines 1392..1392
        src/wafo/misc.py on lines 1713..1713
        src/wafo/objects.py on lines 2562..2562
        src/wafo/sg_filter/_core.py on lines 1195..1195
        src/wafo/sg_filter/_core.py on lines 1198..1198
        src/wafo/stats/_continuous_distns.py on lines 722..722

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 8 locations. Consider refactoring.
        Open

                x = np.asarray(signal, dtype=dtype)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 7 other locations - About 55 mins to fix
        src/wafo/integrate_oscillating.py on lines 52..52
        src/wafo/kdetools/gridding.py on lines 220..220
        src/wafo/kdetools/kernels.py on lines 808..808
        src/wafo/kdetools/kernels.py on lines 1008..1008
        src/wafo/kdetools/kernels.py on lines 1112..1112
        src/wafo/objects.py on lines 2570..2570
        src/wafo/stats/tests/test_fit.py on lines 93..93

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    if np.abs(np.log10(s) - np.log10(self.s_min)) < self.errp:
                        warnings.warn("""s = %g: the lower bound for s has been reached.
                    Put s as an input variable if required.""" % s)
        Severity: Major
        Found in src/wafo/sg_filter/_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 449..451
        src/wafo/stats/core.py on lines 906..907
        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 7 locations. Consider refactoring.
        Open

                    elif np.abs(np.log10(s) - np.log10(self.s_max)) < self.errp:
                        warnings.warn("""s = %g: the Upper bound for s has been reached.
                    Put s as an input variable if required.""" % s)
        Severity: Major
        Found in src/wafo/sg_filter/_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/stats/core.py on lines 906..907
        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 5 locations. Consider refactoring.
        Open

                    yhat = idctn(gamma_s * DCTy)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 55 mins to fix
        src/wafo/kdetools/kdetools.py on lines 969..969
        src/wafo/kdetools/kdetools.py on lines 999..999
        src/wafo/sg_filter/demos.py on lines 126..126
        src/wafo/spectrum/models.py on lines 1709..1709

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                GCVscore = RSS / self.nof / (1.0 - TrH / y.size) ** 2
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 55 mins to fix
        src/wafo/stats/_continuous_distns.py on lines 4592..4592
        src/wafo/stats/_continuous_distns.py on lines 4606..4606

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                if y.size < 2:
                    return data
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 55 mins to fix
        src/wafo/misc.py on lines 1464..1465

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                self._coeff = _savitzky_golay.savgol_coeffs(window_length,
                                                            degree, deriv=diff_order,
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 55 mins to fix
        src/wafo/covariance/core.py on lines 260..260

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    if z0 is None:
                        z = self._initial_guess(y, self.is_finite)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 10 other locations - About 50 mins to fix
        src/wafo/interpolate.py on lines 767..767
        src/wafo/interpolate.py on lines 768..768
        src/wafo/interpolate.py on lines 850..850
        src/wafo/interpolate.py on lines 851..851
        src/wafo/interpolate.py on lines 854..857
        src/wafo/interpolate.py on lines 859..859
        src/wafo/sg_filter/_core.py on lines 507..507
        src/wafo/sg_filter/_core.py on lines 1023..1023
        src/wafo/stats/_continuous_distns.py on lines 6364..6364
        src/wafo/stats/_continuous_distns.py on lines 8276..8277

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 14.

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

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

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

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

        Refactorings

        Further Reading

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

                PHT = np.dot(P, H.T)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 10 other locations - About 50 mins to fix
        src/wafo/interpolate.py on lines 767..767
        src/wafo/interpolate.py on lines 768..768
        src/wafo/interpolate.py on lines 850..850
        src/wafo/interpolate.py on lines 851..851
        src/wafo/interpolate.py on lines 854..857
        src/wafo/interpolate.py on lines 859..859
        src/wafo/sg_filter/_core.py on lines 391..392
        src/wafo/sg_filter/_core.py on lines 507..507
        src/wafo/stats/_continuous_distns.py on lines 6364..6364
        src/wafo/stats/_continuous_distns.py on lines 8276..8277

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 14.

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

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

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

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

        Refactorings

        Further Reading

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

                    h = self._average_leverage(s, self.N)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 10 other locations - About 50 mins to fix
        src/wafo/interpolate.py on lines 767..767
        src/wafo/interpolate.py on lines 768..768
        src/wafo/interpolate.py on lines 850..850
        src/wafo/interpolate.py on lines 851..851
        src/wafo/interpolate.py on lines 854..857
        src/wafo/interpolate.py on lines 859..859
        src/wafo/sg_filter/_core.py on lines 391..392
        src/wafo/sg_filter/_core.py on lines 1023..1023
        src/wafo/stats/_continuous_distns.py on lines 6364..6364
        src/wafo/stats/_continuous_distns.py on lines 8276..8277

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 5 locations. Consider refactoring.
        Open

                _assert(0 < dx, 'DX must be larger than zero.')
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 50 mins to fix
        src/wafo/integrate.py on lines 471..471
        src/wafo/kdetools/kdetools.py on lines 632..633
        src/wafo/kdetools/kernels.py on lines 277..277
        src/wafo/misc.py on lines 850..850

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                _assert(np.isscalar(dx), 'DX must be a scalar.')
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 3 other locations - About 50 mins to fix
        src/wafo/integrate.py on lines 1227..1228
        src/wafo/integrate_oscillating.py on lines 318..319
        src/wafo/wave_theory/dispersion_relation.py on lines 88..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 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 3 locations. Consider refactoring.
        Open

                x = self._predict_state(self.x, u)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 50 mins to fix
        src/wafo/dctpack.py on lines 165..168
        src/wafo/kdetools/kdetools.py on lines 714..714

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                self.P = self._update_covariance(P, K)
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 50 mins to fix
        src/wafo/sg_filter/_core.py on lines 299..299

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                self.z0 = self._get_start_condition(y, z0)
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 50 mins to fix
        src/wafo/sg_filter/_core.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 16 locations. Consider refactoring.
        Open

            @property
            def A(self):
                return self._a
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 15 other locations - About 45 mins to fix
        src/wafo/kdetools/kdetools.py on lines 69..71
        src/wafo/kdetools/kdetools.py on lines 78..80
        src/wafo/kdetools/kdetools.py on lines 102..104
        src/wafo/kdetools/kdetools.py on lines 116..118
        src/wafo/kdetools/kdetools.py on lines 637..639
        src/wafo/kdetools/kdetools.py on lines 651..653
        src/wafo/kdetools/kdetools.py on lines 666..668
        src/wafo/kdetools/kdetools.py on lines 960..962
        src/wafo/kdetools/kernels.py on lines 272..274
        src/wafo/sg_filter/_core.py on lines 947..949
        src/wafo/sg_filter/_core.py on lines 959..961
        src/wafo/sg_filter/_core.py on lines 971..973
        src/wafo/spectrum/core.py on lines 719..721
        src/wafo/spectrum/models.py on lines 1524..1526
        src/wafo/transform/models.py on lines 154..156

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 16 locations. Consider refactoring.
        Open

            @property
            def H(self):
                return self._h
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 15 other locations - About 45 mins to fix
        src/wafo/kdetools/kdetools.py on lines 69..71
        src/wafo/kdetools/kdetools.py on lines 78..80
        src/wafo/kdetools/kdetools.py on lines 102..104
        src/wafo/kdetools/kdetools.py on lines 116..118
        src/wafo/kdetools/kdetools.py on lines 637..639
        src/wafo/kdetools/kdetools.py on lines 651..653
        src/wafo/kdetools/kdetools.py on lines 666..668
        src/wafo/kdetools/kdetools.py on lines 960..962
        src/wafo/kdetools/kernels.py on lines 272..274
        src/wafo/sg_filter/_core.py on lines 935..937
        src/wafo/sg_filter/_core.py on lines 947..949
        src/wafo/sg_filter/_core.py on lines 971..973
        src/wafo/spectrum/core.py on lines 719..721
        src/wafo/spectrum/models.py on lines 1524..1526
        src/wafo/transform/models.py on lines 154..156

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 36 locations. Consider refactoring.
        Open

                Y0 = self.smgauss(X, Y0, DX)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 35 other locations - About 45 mins to fix
        src/wafo/containers.py on lines 235..236
        src/wafo/containers.py on lines 307..307
        src/wafo/integrate.py on lines 1014..1014
        src/wafo/integrate.py on lines 1412..1412
        src/wafo/integrate_oscillating.py on lines 442..442
        src/wafo/integrate_oscillating.py on lines 492..492
        src/wafo/interpolate.py on lines 574..574
        src/wafo/interpolate.py on lines 577..577
        src/wafo/kdetools/kdetools.py on lines 712..712
        src/wafo/kdetools/kernels.py on lines 820..820
        src/wafo/kdetools/kernels.py on lines 912..912
        src/wafo/kdetools/kernels.py on lines 1018..1018
        src/wafo/kdetools/kernels.py on lines 1139..1139
        src/wafo/kdetools/kernels.py on lines 1247..1247
        src/wafo/misc.py on lines 248..248
        src/wafo/misc.py on lines 1339..1339
        src/wafo/misc.py on lines 1393..1393
        src/wafo/misc.py on lines 2248..2248
        src/wafo/misc.py on lines 2260..2260
        src/wafo/misc.py on lines 2262..2262
        src/wafo/misc.py on lines 2273..2273
        src/wafo/misc.py on lines 2292..2292
        src/wafo/misc.py on lines 2461..2461
        src/wafo/objects.py on lines 446..446
        src/wafo/objects.py on lines 978..978
        src/wafo/sg_filter/_core.py on lines 429..429
        src/wafo/sg_filter/_core.py on lines 1167..1167
        src/wafo/sg_filter/_core.py on lines 1168..1168
        src/wafo/sg_filter/demos.py on lines 424..424
        src/wafo/sg_filter/demos.py on lines 426..426
        src/wafo/sg_filter/demos.py on lines 428..428
        src/wafo/spectrum/models.py on lines 1582..1582
        src/wafo/stats/_continuous_distns.py on lines 3870..3870
        src/wafo/stats/estimation.py on lines 534..537
        src/wafo/transform/models.py on lines 72..72

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 16 locations. Consider refactoring.
        Open

            @property
            def Q(self):
                return self._q
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 15 other locations - About 45 mins to fix
        src/wafo/kdetools/kdetools.py on lines 69..71
        src/wafo/kdetools/kdetools.py on lines 78..80
        src/wafo/kdetools/kdetools.py on lines 102..104
        src/wafo/kdetools/kdetools.py on lines 116..118
        src/wafo/kdetools/kdetools.py on lines 637..639
        src/wafo/kdetools/kdetools.py on lines 651..653
        src/wafo/kdetools/kdetools.py on lines 666..668
        src/wafo/kdetools/kdetools.py on lines 960..962
        src/wafo/kdetools/kernels.py on lines 272..274
        src/wafo/sg_filter/_core.py on lines 935..937
        src/wafo/sg_filter/_core.py on lines 959..961
        src/wafo/sg_filter/_core.py on lines 971..973
        src/wafo/spectrum/core.py on lines 719..721
        src/wafo/spectrum/models.py on lines 1524..1526
        src/wafo/transform/models.py on lines 154..156

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 36 locations. Consider refactoring.
        Open

                ADX = self.smgauss(X, ADX, DX)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 35 other locations - About 45 mins to fix
        src/wafo/containers.py on lines 235..236
        src/wafo/containers.py on lines 307..307
        src/wafo/integrate.py on lines 1014..1014
        src/wafo/integrate.py on lines 1412..1412
        src/wafo/integrate_oscillating.py on lines 442..442
        src/wafo/integrate_oscillating.py on lines 492..492
        src/wafo/interpolate.py on lines 574..574
        src/wafo/interpolate.py on lines 577..577
        src/wafo/kdetools/kdetools.py on lines 712..712
        src/wafo/kdetools/kernels.py on lines 820..820
        src/wafo/kdetools/kernels.py on lines 912..912
        src/wafo/kdetools/kernels.py on lines 1018..1018
        src/wafo/kdetools/kernels.py on lines 1139..1139
        src/wafo/kdetools/kernels.py on lines 1247..1247
        src/wafo/misc.py on lines 248..248
        src/wafo/misc.py on lines 1339..1339
        src/wafo/misc.py on lines 1393..1393
        src/wafo/misc.py on lines 2248..2248
        src/wafo/misc.py on lines 2260..2260
        src/wafo/misc.py on lines 2262..2262
        src/wafo/misc.py on lines 2273..2273
        src/wafo/misc.py on lines 2292..2292
        src/wafo/misc.py on lines 2461..2461
        src/wafo/objects.py on lines 446..446
        src/wafo/objects.py on lines 978..978
        src/wafo/sg_filter/_core.py on lines 429..429
        src/wafo/sg_filter/_core.py on lines 1168..1168
        src/wafo/sg_filter/_core.py on lines 1169..1169
        src/wafo/sg_filter/demos.py on lines 424..424
        src/wafo/sg_filter/demos.py on lines 426..426
        src/wafo/sg_filter/demos.py on lines 428..428
        src/wafo/spectrum/models.py on lines 1582..1582
        src/wafo/stats/_continuous_distns.py on lines 3870..3870
        src/wafo/stats/estimation.py on lines 534..537
        src/wafo/transform/models.py on lines 72..72

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 36 locations. Consider refactoring.
        Open

                u = self._studentized_residuals(r, I, h)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 35 other locations - About 45 mins to fix
        src/wafo/containers.py on lines 235..236
        src/wafo/containers.py on lines 307..307
        src/wafo/integrate.py on lines 1014..1014
        src/wafo/integrate.py on lines 1412..1412
        src/wafo/integrate_oscillating.py on lines 442..442
        src/wafo/integrate_oscillating.py on lines 492..492
        src/wafo/interpolate.py on lines 574..574
        src/wafo/interpolate.py on lines 577..577
        src/wafo/kdetools/kdetools.py on lines 712..712
        src/wafo/kdetools/kernels.py on lines 820..820
        src/wafo/kdetools/kernels.py on lines 912..912
        src/wafo/kdetools/kernels.py on lines 1018..1018
        src/wafo/kdetools/kernels.py on lines 1139..1139
        src/wafo/kdetools/kernels.py on lines 1247..1247
        src/wafo/misc.py on lines 248..248
        src/wafo/misc.py on lines 1339..1339
        src/wafo/misc.py on lines 1393..1393
        src/wafo/misc.py on lines 2248..2248
        src/wafo/misc.py on lines 2260..2260
        src/wafo/misc.py on lines 2262..2262
        src/wafo/misc.py on lines 2273..2273
        src/wafo/misc.py on lines 2292..2292
        src/wafo/misc.py on lines 2461..2461
        src/wafo/objects.py on lines 446..446
        src/wafo/objects.py on lines 978..978
        src/wafo/sg_filter/_core.py on lines 1167..1167
        src/wafo/sg_filter/_core.py on lines 1168..1168
        src/wafo/sg_filter/_core.py on lines 1169..1169
        src/wafo/sg_filter/demos.py on lines 424..424
        src/wafo/sg_filter/demos.py on lines 426..426
        src/wafo/sg_filter/demos.py on lines 428..428
        src/wafo/spectrum/models.py on lines 1582..1582
        src/wafo/stats/_continuous_distns.py on lines 3870..3870
        src/wafo/stats/estimation.py on lines 534..537
        src/wafo/transform/models.py on lines 72..72

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 36 locations. Consider refactoring.
        Open

                S0 = self.smgauss(X, S0, DX)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 35 other locations - About 45 mins to fix
        src/wafo/containers.py on lines 235..236
        src/wafo/containers.py on lines 307..307
        src/wafo/integrate.py on lines 1014..1014
        src/wafo/integrate.py on lines 1412..1412
        src/wafo/integrate_oscillating.py on lines 442..442
        src/wafo/integrate_oscillating.py on lines 492..492
        src/wafo/interpolate.py on lines 574..574
        src/wafo/interpolate.py on lines 577..577
        src/wafo/kdetools/kdetools.py on lines 712..712
        src/wafo/kdetools/kernels.py on lines 820..820
        src/wafo/kdetools/kernels.py on lines 912..912
        src/wafo/kdetools/kernels.py on lines 1018..1018
        src/wafo/kdetools/kernels.py on lines 1139..1139
        src/wafo/kdetools/kernels.py on lines 1247..1247
        src/wafo/misc.py on lines 248..248
        src/wafo/misc.py on lines 1339..1339
        src/wafo/misc.py on lines 1393..1393
        src/wafo/misc.py on lines 2248..2248
        src/wafo/misc.py on lines 2260..2260
        src/wafo/misc.py on lines 2262..2262
        src/wafo/misc.py on lines 2273..2273
        src/wafo/misc.py on lines 2292..2292
        src/wafo/misc.py on lines 2461..2461
        src/wafo/objects.py on lines 446..446
        src/wafo/objects.py on lines 978..978
        src/wafo/sg_filter/_core.py on lines 429..429
        src/wafo/sg_filter/_core.py on lines 1167..1167
        src/wafo/sg_filter/_core.py on lines 1169..1169
        src/wafo/sg_filter/demos.py on lines 424..424
        src/wafo/sg_filter/demos.py on lines 426..426
        src/wafo/sg_filter/demos.py on lines 428..428
        src/wafo/spectrum/models.py on lines 1582..1582
        src/wafo/stats/_continuous_distns.py on lines 3870..3870
        src/wafo/stats/estimation.py on lines 534..537
        src/wafo/transform/models.py on lines 72..72

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                Xk = np.atleast_2d(X).T
        Severity: Major
        Found in src/wafo/sg_filter/_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/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/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 16 locations. Consider refactoring.
        Open

            @property
            def P(self):
                return self._p
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 15 other locations - About 45 mins to fix
        src/wafo/kdetools/kdetools.py on lines 69..71
        src/wafo/kdetools/kdetools.py on lines 78..80
        src/wafo/kdetools/kdetools.py on lines 102..104
        src/wafo/kdetools/kdetools.py on lines 116..118
        src/wafo/kdetools/kdetools.py on lines 637..639
        src/wafo/kdetools/kdetools.py on lines 651..653
        src/wafo/kdetools/kdetools.py on lines 666..668
        src/wafo/kdetools/kdetools.py on lines 960..962
        src/wafo/kdetools/kernels.py on lines 272..274
        src/wafo/sg_filter/_core.py on lines 935..937
        src/wafo/sg_filter/_core.py on lines 947..949
        src/wafo/sg_filter/_core.py on lines 959..961
        src/wafo/spectrum/core.py on lines 719..721
        src/wafo/spectrum/models.py on lines 1524..1526
        src/wafo/transform/models.py on lines 154..156

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                self.nof = self.is_finite.sum()  # number of finite elements
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 45 mins to fix
        src/wafo/spectrum/models.py on lines 161..161
        src/wafo/spectrum/tests/test_specdata1d.py on lines 19..19
        src/wafo/spectrum/tests/test_specdata1d.py on lines 113..113
        src/wafo/stats/estimation.py on lines 1125..1126

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                _assert(np.all(0 <= weights), 'Weights must all be >=0')
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 45 mins to fix
        src/wafo/integrate.py on lines 753..753

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    msg = """Maximum number of iterations (%d) has been exceeded.
                    Increase MaxIter option or decrease TolZ value.""" % (self.maxiter)
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 45 mins to fix
        src/wafo/transform/models.py on lines 217..219

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                    z[int((shape[k] + 0.5) / 10) + 1::, ...] = 0
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 45 mins to fix
        src/wafo/misc.py on lines 1594..1594

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 n == 0:
                    return y
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 45 mins to fix
        src/wafo/containers.py on lines 409..410

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 self.fulloutput:
                    return z, s
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 40 mins to fix
        src/wafo/integrate_oscillating.py on lines 235..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 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 16 locations. Consider refactoring.
        Open

                    shape0[i] = 1
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 15 other locations - About 35 mins to fix
        src/wafo/covariance/core.py on lines 408..408
        src/wafo/covariance/estimation.py on lines 137..137
        src/wafo/covariance/estimation.py on lines 164..164
        src/wafo/integrate_oscillating.py on lines 47..47
        src/wafo/integrate_oscillating.py on lines 401..401
        src/wafo/integrate_oscillating.py on lines 402..402
        src/wafo/interpolate.py on lines 784..784
        src/wafo/misc.py on lines 857..857
        src/wafo/misc.py on lines 1718..1719
        src/wafo/misc.py on lines 1740..1740
        src/wafo/misc.py on lines 2009..2009
        src/wafo/sg_filter/_core.py on lines 257..257
        src/wafo/spectrum/models.py on lines 1856..1856
        src/wafo/spectrum/models.py on lines 1874..1874
        src/wafo/spectrum/models.py on lines 1933..1933

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 16 locations. Consider refactoring.
        Open

                sh1[i] = 1
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 15 other locations - About 35 mins to fix
        src/wafo/covariance/core.py on lines 408..408
        src/wafo/covariance/estimation.py on lines 137..137
        src/wafo/covariance/estimation.py on lines 164..164
        src/wafo/integrate_oscillating.py on lines 47..47
        src/wafo/integrate_oscillating.py on lines 401..401
        src/wafo/integrate_oscillating.py on lines 402..402
        src/wafo/interpolate.py on lines 784..784
        src/wafo/misc.py on lines 857..857
        src/wafo/misc.py on lines 1718..1719
        src/wafo/misc.py on lines 1740..1740
        src/wafo/misc.py on lines 2009..2009
        src/wafo/sg_filter/_core.py on lines 350..350
        src/wafo/spectrum/models.py on lines 1856..1856
        src/wafo/spectrum/models.py on lines 1874..1874
        src/wafo/spectrum/models.py on lines 1933..1933

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 10 locations. Consider refactoring.
        Open

                np.putmask(YY, outliers, Y0)        # YY[outliers] = Y0[outliers]
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 9 other locations - About 35 mins to fix
        src/wafo/interpolate.py on lines 623..623
        src/wafo/misc.py on lines 251..255
        src/wafo/spectrum/core.py on lines 839..839
        src/wafo/spectrum/models.py on lines 606..606
        src/wafo/stats/_continuous_distns.py on lines 6171..6171
        src/wafo/stats/_continuous_distns.py on lines 6178..6178
        src/wafo/stats/_continuous_distns.py on lines 7916..7916
        src/wafo/stats/_continuous_distns.py on lines 7921..7921
        src/wafo/stats/estimation.py on lines 398..398

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                        s = 10 ** log10s
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 35 mins to fix
        src/wafo/sg_filter/_core.py on lines 455..455
        src/wafo/stats/_continuous_distns.py on lines 4498..4498

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                return np.abs(r / (1.4826 * median_abs_deviation) / sqrt(1 - h))
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 35 mins to fix
        src/wafo/gaussian.py on lines 928..928
        src/wafo/stats/core.py on lines 459..459

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 11.

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

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

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

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

        Refactorings

        Further Reading

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

                self.num_outliers = outliers.sum()
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 35 mins to fix
        src/wafo/stats/estimation.py on lines 1192..1192
        build_package.py on lines 83..83

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            return SmoothNd(s, weight, robust, z0, tolz, maxiter, fulloutput)(data)
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 35 mins to fix
        src/wafo/interpolate.py on lines 1158..1158
        src/wafo/kdetools/gridding.py on lines 358..358

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                s = 10.0 ** p
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 35 mins to fix
        src/wafo/sg_filter/_core.py on lines 492..492
        src/wafo/stats/_continuous_distns.py on lines 4498..4498

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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(X) <= 1:
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 2 other locations - About 35 mins to fix
        src/wafo/gaussian.py on lines 891..891
        src/wafo/stats/core.py on lines 592..592

        Duplicated Code

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

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

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

        Tuning

        This issue has a mass of 11.

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

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

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

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

        Refactorings

        Further Reading

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

                return noisevar / M.mean() ** 2
        Severity: Minor
        Found in src/wafo/sg_filter/_core.py and 1 other location - About 35 mins to fix
        src/wafo/stats/core.py on lines 750..750

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 y.ndim > 1:
                    coeff.shape = (-1, 1)
        Severity: Major
        Found in src/wafo/sg_filter/_core.py and 4 other locations - About 30 mins to fix
        src/wafo/misc.py on lines 2682..2682
        src/wafo/misc.py on lines 2686..2686
        src/wafo/misc.py on lines 2894..2894
        src/wafo/wave_theory/core.py on lines 331..331

        Duplicated Code

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

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

        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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