wafo-project/pywafo

View on GitHub
src/wafo/misc.py

Summary

Maintainability
F
1 mo
Test Coverage

File misc.py has 2355 lines of code (exceeds 1000 allowed). Consider refactoring.
Open

'''
Misc
'''

try:
Severity: Major
Found in src/wafo/misc.py - About 4 days to fix

    Cyclomatic complexity is too high in function findpeaks. (12)
    Open

    def findpeaks(data, n=2, min_h=None, min_p=0.0):
        '''
        Find peaks of vector or matrix possibly rainflow filtered
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function findtp. (10)
    Open

    def findtp(x, h=0.0, kind=None, method='clib'):
        '''
        Return indices to turning points (tp) of data, optionally rainflow filtered.
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function trangood. (9)
    Open

    def trangood(x, f, min_n=None, min_x=None, max_x=None, max_n=inf):
        """
        Make sure transformation is efficient.
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function findrfc. (9)
    Open

    def findrfc(tp, h=0.0, method='clib'):
        '''
        Return indices to rainflow cycles of a sequence of TP.
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.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 findoutliers has a Cognitive Complexity of 27 (exceeds 15 allowed). Consider refactoring.
    Open

    def findoutliers(x, zcrit=0.0, dcrit=None, ddcrit=None, verbose=False):
        """
        Return indices to spurious points of data
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py - About 2 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Cyclomatic complexity is too high in function piecewise. (8)
    Open

    def piecewise(condlist, funclist, xi=None, fillvalue=0.0, args=(), **kw):
        """
        Evaluate a piecewise-defined function.
    
        Given a set of conditions and corresponding functions, evaluate each
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function findoutliers. (8)
    Open

    def findoutliers(x, zcrit=0.0, dcrit=None, ddcrit=None, verbose=False):
        """
        Return indices to spurious points of data
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function findcross. (8)
    Open

    def findcross(x, v=0.0, kind=None, method='clib'):
        '''
        Return indices to level v up and/or downcrossings of a vector
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function findtc. (7)
    Open

    def findtc(x_in, v=None, kind=None):
        """
        Return indices to troughs and crests of data.
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

    Cyclomatic complexity is too high in function fourier. (7)
    Open

    def fourier(data, t=None, period=None, m=None, method='trapz'):
        '''
        Returns Fourier coefficients.
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py by radon

    Cyclomatic Complexity

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

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

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

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

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

    def binomln(z, w):
        '''
        Natural Logarithm of binomial coefficient.
    
        CALL binomln(z,w)
    Severity: Minor
    Found in src/wafo/misc.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 findpeaks has a Cognitive Complexity of 20 (exceeds 15 allowed). Consider refactoring.
    Open

    def findpeaks(data, n=2, min_h=None, min_p=0.0):
        '''
        Find peaks of vector or matrix possibly rainflow filtered
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function findtp has a Cognitive Complexity of 16 (exceeds 15 allowed). Consider refactoring.
    Open

    def findtp(x, h=0.0, kind=None, method='clib'):
        '''
        Return indices to turning points (tp) of data, optionally rainflow filtered.
    
        Parameters
    Severity: Minor
    Found in src/wafo/misc.py - About 25 mins to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

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

    def findtp(x, h=0.0, kind=None, method='clib'):
    Severity: Critical
    Found in src/wafo/misc.py by sonar-python

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

    See

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

    def findoutliers(x, zcrit=0.0, dcrit=None, ddcrit=None, verbose=False):
    Severity: Critical
    Found in src/wafo/misc.py by sonar-python

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

    See

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

    def findpeaks(data, n=2, min_h=None, min_p=0.0):
    Severity: Critical
    Found in src/wafo/misc.py by sonar-python

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

    See

    Remove this commented out code.
    Open

        # S    = round(2/3*(L)**0.525)
    Severity: Major
    Found in src/wafo/misc.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 gammaln(z+1.) - gammaln(w+1.) - gammaln(z-w+1.)
    Severity: Major
    Found in src/wafo/misc.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

                    # assert(isinstance(self._module, types.ModuleType), 'module')
    Severity: Major
    Found in src/wafo/misc.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

        # yy[0,0] = 0.0 # pdf
    Severity: Major
    Found in src/wafo/misc.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

        # reltol = abstol = tol
    Severity: Major
    Found in src/wafo/misc.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

                # converged = abserr <= np.maximum(abseps, releps * abs(fy))
    Severity: Major
    Found in src/wafo/misc.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"

    Correct one of the identical sub-expressions on both sides of operator "==".
    Open

        expand_arr = (condition == condition)
    Severity: Major
    Found in src/wafo/misc.py by sonar-python

    Using the same value on either side of a binary operator is almost always a mistake. In the case of logical operators, it is either a copy/paste error and therefore a bug, or it is simply wasted code, and should be simplified. In the case of bitwise operators and most binary mathematical operators, having the same value on both sides of an operator yields predictable results, and should be simplified.

    This rule ignores *, +, and =.

    Noncompliant Code Example

    if a == a: # Noncompliant
        work()
    
    if  a != a: # Noncompliant
        work()
    
    if  a == b and a == b: # Noncompliant
        work()
    
    if a == b or a == b: # Noncompliant
        work()
    
    j = 5 / 5 # Noncompliant
    k = 5 - 5 # Noncompliant
    

    Exceptions

    The following are ignored:

    • The expression 1 << 1

    See

    • CERT, MSC12-C. - Detect and remove code that has no effect or is never executed
    • CERT, MSC12-CPP. - Detect and remove code that has no effect
    • {rule:python:S1656} - Implements a check on =.

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

            f2 = fo[0] + x1 * (fo[1] - fo[0]) / (xo[1] - xo[0])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 5 hrs to fix
    src/wafo/misc.py on lines 2476..2476

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 65.

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

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

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

    See codeclimate-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

            f2 = f[-1] + x1 * (f[-1] - f[-2]) / (xo[-1] - xo[-2])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 5 hrs to fix
    src/wafo/misc.py on lines 2470..2470

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 65.

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

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

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

    See codeclimate-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

            data.put(2, cos(rheading) * sin(rpitch) * cos(rroll) + sin(rheading) * sin(rroll))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 4 hrs to fix
    src/wafo/misc.py on lines 378..378

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 54.

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

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

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

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

    Refactorings

    Further Reading

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

            data.put(4, sin(rheading) * sin(rpitch) * sin(rroll) + cos(rheading) * cos(rroll))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 4 hrs to fix
    src/wafo/misc.py on lines 376..376

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 54.

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

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

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

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

    Refactorings

    Further Reading

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

            data.put(1, cos(rheading) * sin(rpitch) * sin(rroll) - sin(rheading) * cos(rroll))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 4 hrs to fix
    src/wafo/misc.py on lines 379..379

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 54.

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

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

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

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

    Refactorings

    Further Reading

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

            data.put(5, sin(rheading) * sin(rpitch) * cos(rroll) - cos(rheading) * sin(rroll))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 4 hrs to fix
    src/wafo/misc.py on lines 375..375

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 54.

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

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

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

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

    Refactorings

    Further Reading

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

        y_out = x * rot_param[3] + y * rot_param[4] + z * rot_param[5]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 4 hrs to fix
    src/wafo/misc.py on lines 406..406
    src/wafo/misc.py on lines 408..408

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 53.

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

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

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

    See codeclimate-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

        z_out = x * rot_param[6] + y * rot_param[7] + z * rot_param[8]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 4 hrs to fix
    src/wafo/misc.py on lines 406..406
    src/wafo/misc.py on lines 407..407

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 53.

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

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

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

    See codeclimate-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_out = x * rot_param[0] + y * rot_param[1] + z * rot_param[2]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 4 hrs to fix
    src/wafo/misc.py on lines 407..407
    src/wafo/misc.py on lines 408..408

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 53.

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

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

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

    See codeclimate-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 fxder[1] * xi[0] ** 2. + fxder[0] * xi[1]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 3 hrs to fix
    src/wafo/misc.py on lines 2573..2573
    src/wafo/misc.py on lines 2581..2581

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

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

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

    See codeclimate-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 (fxder[3] * xi[0] ** 4. + fxder[0] * xi[3] +
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 3 hrs to fix
    src/wafo/misc.py on lines 2567..2567
    src/wafo/misc.py on lines 2573..2573

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

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

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

    See codeclimate-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 (fxder[2] * xi[0] ** 3 + fxder[0] * xi[2] +
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 3 hrs to fix
    src/wafo/misc.py on lines 2567..2567
    src/wafo/misc.py on lines 2581..2581

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 49.

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

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

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

    See codeclimate-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 bins is None:
            bins = int(np.ceil(4 * np.sqrt(np.sqrt(len(x)))))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 3 hrs to fix
    src/wafo/misc.py on lines 2657..2658

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 47.

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

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

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

    See codeclimate-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 num_bins is None:
                num_bins = int(np.ceil(4 * np.sqrt(np.sqrt(len(x)))))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 3 hrs to fix
    src/wafo/misc.py on lines 2716..2717

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 47.

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

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

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

    See codeclimate-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

        shipchar = dict(beam=beam, beamSTD=beam_err,
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 3 hrs to fix
    src/wafo/stats/distributions.py on lines 229..229

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 44.

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

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

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

    See codeclimate-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 np.any(r_3):
            out[r_3] = _betaln3(a[r_3], b[r_3])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2115..2116

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 38.

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

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

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

    See codeclimate-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 ddcrit is None:
            ddcrit = 1.5 * xn.std()
            if verbose:
                print('ddcrit is set to %g' % ddcrit)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1720..1723

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 38.

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

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

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

    See codeclimate-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 np.any(r12):
            out[r12] = betaln(a[r12], b[r12])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2112..2113

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 38.

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

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

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

    See codeclimate-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 dcrit is None:
            dcrit = 1.5 * xn.std()
            if verbose:
                print('dcrit is set to %g' % dcrit)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1725..1728

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 38.

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

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

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

    See codeclimate-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

                first_is_down_crossing = int(xn[ind[0]] > xn[ind[0] + 1])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1585..1585

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 37.

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

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

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

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

    Refactorings

    Further Reading

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

            y[n35] = (S0 - (S1 - (S2 - S3 / nn35) / nn35) / nn35) / n1[n35]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1900..1900

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 37.

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

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

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

    See codeclimate-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 - (S1 - (S2 - (S3 - S4 / nn15) / nn15) / nn15) / nn15) / n1[n15]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1894..1894

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 37.

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

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

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

    See codeclimate-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

        first_is_down_crossing = (x[v_ind[0]] > x[v_ind[0] + 1])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1081..1081

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 37.

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

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

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

    See codeclimate-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[i] = intfun(x * cos(i * tmp), t, axis=-1)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2903..2903

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 36.

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

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

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

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

    Refactorings

    Further Reading

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

            b[i] = intfun(x * sin(i * tmp), t, axis=-1)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2902..2902

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 36.

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

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

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

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

    Refactorings

    Further Reading

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

        beam = np.round(1.78 * max_deadweight ** 0.27 * 10) / 10
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 2 hrs to fix
    src/wafo/misc.py on lines 1989..1989
    src/wafo/misc.py on lines 1993..1993

    Duplicated Code

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

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

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

        draught = np.round(0.80 * max_deadweight ** 0.24 * 10) / 10
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 2 hrs to fix
    src/wafo/misc.py on lines 1986..1986
    src/wafo/misc.py on lines 1993..1993

    Duplicated Code

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

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

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

        speed = np.round(1.14 * max_deadweight ** 0.21 * 10) / 10
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 2 hrs to fix
    src/wafo/misc.py on lines 1986..1986
    src/wafo/misc.py on lines 1989..1989

    Duplicated Code

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

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

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

            first_is_max = (x[ind[0]] > x[ind[1]])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/objects.py on lines 2109..2109

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 35.

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

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

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

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

    Refactorings

    Further Reading

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

                num_tries += int(abs(err - err0) <= tol / 2)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2264..2264

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 33.

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

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

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

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

    Refactorings

    Further Reading

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

            num_tries += int(abs(err - err0) <= tol / 2)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2306..2306

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 33.

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

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

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

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

    Refactorings

    Further Reading

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

                    ind2 = np.flatnonzero(data1[iy, ind] > data1[iy + 1, ind])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1207..1208

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

                    ind2 = np.flatnonzero(data1[iy, ind] > data1[iy - 1, ind])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1207..1207

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

                    ind2 = np.flatnonzero((data1[iy, ind] > data1[iy - 1, ind]) &
                                          (data1[iy, ind] > data1[iy + 1, ind]))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1203..1203

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

                erri = 0.5 * (abserr / (np.abs(fy0) + np.abs(fy) + _TINY + tol))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2263..2263

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

        y[n500] = (S0 - S1 / nn[n500]) / n1[n500]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1890..1890

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

                    6. * fxder[2] * xi[0] ** 2. * xi[1] +
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/spectrum/core.py on lines 3856..3856

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

            err = 0.5 * np.amax(np.abs(y00 - y) / (np.abs(y00) + np.abs(y) + _TINY + tol))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 2295..2295

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

            y[n80] = (S0 - (S1 - S2 / nn[n80]) / nn[n80]) / n1[n80]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/misc.py on lines 1887..1887

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 31.

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

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

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

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

    Refactorings

    Further Reading

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

            e = np.floor(np.log(d) / np.log(10))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 2 hrs to fix
    src/wafo/stats/estimation.py on lines 1509..1509

    Duplicated Code

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

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

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

        prop2max_dw = dict(length=lambda x: (x / 3.45) ** (2.5),
                           beam=lambda x: ((x / 1.78) ** (1 / 0.27)),
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1914..1916
    src/wafo/misc.py on lines 1914..1917

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 27.

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

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

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

    See codeclimate-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 = fo[fi] + (fo[fi + 1] - fo[fi]) * xu
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/_misc_numba.py on lines 572..572
    src/wafo/misc.py on lines 988..989
    src/wafo/misc.py on lines 988..988

    Duplicated Code

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

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

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

                    3 * fxder[1] * xi[0] * xi[1])
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 2583..2583
    src/wafo/spectrum/core.py on lines 3843..3843
    src/wafo/spectrum/core.py on lines 3865..3865

    Duplicated Code

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

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

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

        return (t[ind] + (v - f[ind]) * (t[ind + 1] - t[ind]) /
                (f[ind + 1] - f[ind]))
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/_misc_numba.py on lines 572..572
    src/wafo/misc.py on lines 988..988
    src/wafo/misc.py on lines 2600..2600

    Duplicated Code

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

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

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

                    fxder[1] * (3. * xi[1] ** 2. + 4. * xi[0] * xi[1]))
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 2574..2574
    src/wafo/spectrum/core.py on lines 3843..3843
    src/wafo/spectrum/core.py on lines 3865..3865

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 25.

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

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

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

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

    Refactorings

    Further Reading

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

            xi = np.arange(x0, xn + dx / 2., dx)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2677..2677

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 25.

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

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

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

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

    Refactorings

    Further Reading

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

            x1 = dx * np.arange(np.floor((min_x - xo[0]) / dx), -2)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2475..2475

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 25.

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

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

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

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

    Refactorings

    Further Reading

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

        limits = np.arange(mn, mx + d / 2, d)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2459..2459

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 25.

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

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

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

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

    Refactorings

    Further Reading

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

            x1 = dx * np.arange(1, np.ceil((max_x - xo[-1]) / dx) + 1)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2469..2469

    Duplicated Code

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

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

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 24.

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

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

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

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

    Refactorings

    Further Reading

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

            data.put(3, sin(rheading) * cos(rpitch))
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 374..374
    src/wafo/misc.py on lines 381..381
    src/wafo/misc.py on lines 382..382

    Duplicated Code

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

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

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

            data.put(8, cos(rpitch) * cos(rroll))
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 374..374
    src/wafo/misc.py on lines 377..377
    src/wafo/misc.py on lines 381..381

    Duplicated Code

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

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

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

            data.put(0, cos(rheading) * cos(rpitch))
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 377..377
    src/wafo/misc.py on lines 381..381
    src/wafo/misc.py on lines 382..382

    Duplicated Code

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

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

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

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

            temp = tuple(np.extract(cond, arr) for arr in arrays)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 286..286

    Duplicated Code

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

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

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

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

        temp = tuple(np.extract(cond, arr) for arr in arrays)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.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 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

            data.put(7, cos(rpitch) * sin(rroll))
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 374..374
    src/wafo/misc.py on lines 377..377
    src/wafo/misc.py on lines 382..382

    Duplicated Code

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

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

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

        n35 = np.logical_and(35 < n1, n1 <= 80)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1888..1888
    src/wafo/misc.py on lines 1896..1896

    Duplicated Code

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

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

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

        n15 = np.logical_and(15 < n1, n1 <= 35)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1888..1888
    src/wafo/misc.py on lines 1891..1891

    Duplicated Code

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

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

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

        n80 = np.logical_and(80 < n1, n1 <= 500)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1891..1891
    src/wafo/misc.py on lines 1896..1896

    Duplicated Code

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

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

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

        dx = xo[1] - xo[0]
    Severity: Major
    Found in src/wafo/misc.py and 15 other locations - About 1 hr to fix
    src/wafo/covariance/estimation.py on lines 28..28
    src/wafo/covariance/estimation.py on lines 30..30
    src/wafo/kdetools/kdetools.py on lines 1125..1125
    src/wafo/kdetools/tests/test_gridding.py on lines 19..19
    src/wafo/kdetools/tests/test_gridding.py on lines 34..34
    src/wafo/kdetools/tests/test_gridding.py on lines 53..53
    src/wafo/kdetools/tests/test_gridding.py on lines 77..77
    src/wafo/misc.py on lines 2541..2541
    src/wafo/objects.py on lines 1348..1348
    src/wafo/objects.py on lines 1350..1350
    src/wafo/sg_filter/demos.py on lines 47..47
    src/wafo/spectrum/core.py on lines 1274..1274
    src/wafo/spectrum/core.py on lines 1289..1289
    src/wafo/spectrum/core.py on lines 1406..1406
    src/wafo/spectrum/core.py on lines 1712..1712

    Duplicated Code

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

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

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

            hn = xo[1] - xo[0]
    Severity: Major
    Found in src/wafo/misc.py and 15 other locations - About 1 hr to fix
    src/wafo/covariance/estimation.py on lines 28..28
    src/wafo/covariance/estimation.py on lines 30..30
    src/wafo/kdetools/kdetools.py on lines 1125..1125
    src/wafo/kdetools/tests/test_gridding.py on lines 19..19
    src/wafo/kdetools/tests/test_gridding.py on lines 34..34
    src/wafo/kdetools/tests/test_gridding.py on lines 53..53
    src/wafo/kdetools/tests/test_gridding.py on lines 77..77
    src/wafo/misc.py on lines 2465..2465
    src/wafo/objects.py on lines 1348..1348
    src/wafo/objects.py on lines 1350..1350
    src/wafo/sg_filter/demos.py on lines 47..47
    src/wafo/spectrum/core.py on lines 1274..1274
    src/wafo/spectrum/core.py on lines 1289..1289
    src/wafo/spectrum/core.py on lines 1406..1406
    src/wafo/spectrum/core.py on lines 1712..1712

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 23.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 23.

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

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

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

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

    Refactorings

    Further Reading

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

            if ind[0] != 0:
                ind = np.r_[0, ind, n - 1]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 1481..1482

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 23.

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

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

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

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

    Refactorings

    Further Reading

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

            if x[ind[0]] > x[ind[1]]:  # adds indices to  first and last value
                ind = np.r_[0, ind, n - 1]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 1476..1477

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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 3 locations. Consider refactoring.
    Open

        p_diam_err = 0.12 * length_err ** (3.0 / 4.0)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/kdetools/kernels.py on lines 941..941
    src/wafo/misc.py on lines 1996..1996

    Duplicated Code

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

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

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

        p_diam = 0.12 * length ** (3.0 / 4.0)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/kdetools/kernels.py on lines 941..941
    src/wafo/misc.py on lines 1997..1997

    Duplicated Code

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

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

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

        max_x = xo[-1] if max_x is None else max_x
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2443..2443

    Duplicated Code

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

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

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

        x, y = rho * cos(theta), rho * sin(theta)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/stats/core.py on lines 393..393

    Duplicated Code

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

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

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

        tmp = 2 * pi * t / period
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/_misc_numba.py on lines 268..268

    Duplicated Code

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

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

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

        min_x = xo[0] if min_x is None else min_x
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2442..2442

    Duplicated Code

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

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

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 data is not None:
            data = np.atleast_1d(data)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/objects.py on lines 1501..1502

    Duplicated Code

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

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

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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/misc.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/padua.py on lines 529..531
    src/wafo/sg_filter/_core.py on lines 1221..1223
    src/wafo/sg_filter/demos.py on lines 473..475
    src/wafo/transform/core.py on lines 214..216
    src/wafo/wave_theory/dispersion_relation.py on lines 206..208

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 20.

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

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

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

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

    Refactorings

    Further Reading

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

            if not isinstance(xi, tuple):
                xi = (xi,)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/kdetools/kernels.py on lines 99..100

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 20.

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

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

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

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

    Refactorings

    Further Reading

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

        if not isinstance(newargs, list):
            newargs = [newargs, ]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2587..2588

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 20.

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

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

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

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

    Refactorings

    Further Reading

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

        if not isinstance(xi, list):
            xi = [xi, ]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 1831..1832

    Duplicated Code

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

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

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

        if v is None:
            v = x.mean()
    Severity: Major
    Found in src/wafo/misc.py and 15 other locations - About 1 hr to fix
    src/wafo/containers.py on lines 230..231
    src/wafo/containers.py on lines 312..313
    src/wafo/containers.py on lines 351..352
    src/wafo/graphutil.py on lines 37..38
    src/wafo/graphutil.py on lines 39..40
    src/wafo/graphutil.py on lines 119..120
    src/wafo/graphutil.py on lines 121..122
    src/wafo/graphutil.py on lines 210..211
    src/wafo/stats/estimation.py on lines 544..545
    src/wafo/stats/estimation.py on lines 1449..1450
    src/wafo/stats/estimation.py on lines 1467..1468
    src/wafo/stats/estimation.py on lines 1493..1494
    src/wafo/stats/estimation.py on lines 1545..1546
    src/wafo/stats/estimation.py on lines 1569..1570
    src/wafo/stats/estimation.py on lines 1592..1593

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 19.

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

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

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

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

    Refactorings

    Further Reading

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

        if (y[0] > y[1] and y[1] > y[2] or
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1320..1320
    src/wafo/misc.py on lines 1328..1328
    src/wafo/objects.py on lines 1217..1217

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 19.

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

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

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

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

    Refactorings

    Further Reading

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

                y[0] < y[1] and y[1] < y[2]):
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/interpolate.py on lines 111..111
    src/wafo/misc.py on lines 1329..1329
    src/wafo/spectrum/core.py on lines 1180..1180

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 19.

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

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

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

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

    Refactorings

    Further Reading

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

        t_start = int(y[0] > y[1])  # first is a max, ignore it
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1328..1328
    src/wafo/misc.py on lines 1328..1328
    src/wafo/objects.py on lines 1217..1217

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 19.

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

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

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

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

    Refactorings

    Further Reading

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

        return cos_a * x - sin_a * y, sin_a * x + cos_a * y
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/_misc_numba.py on lines 308..308
    src/wafo/_misc_numba.py on lines 315..315
    src/wafo/wave_theory/core.py on lines 372..372

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

            ind[j + 1] = f2(x[v_ind[j + 1] + 1:v_ind[j + 2] + 1])
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1594..1594
    src/wafo/misc.py on lines 1596..1596

    Duplicated Code

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

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

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

            ind[j] = f1(x[v_ind[j] + 1:v_ind[j + 1] + 1])
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1596..1596
    src/wafo/misc.py on lines 1596..1596

    Duplicated Code

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

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

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

            ind[n_c - 2] = f1(x[v_ind[n_c - 2] + 1:v_ind[n_c - 1] + 1])
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 1600..1600
    src/wafo/objects.py on lines 2578..2578

    Duplicated Code

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

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

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

                    ind_p.append((ind[ind2] + iy * mcols))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/kdetools/demo.py on lines 50..50

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

        length = np.round(3.45 * max_deadweight ** 0.40)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/stats/_continuous_distns.py on lines 6617..6617

    Duplicated Code

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

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

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

            num_cond, num_fun = len(condlist), len(funclist)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/sg_filter/demos.py on lines 467..467

    Duplicated Code

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

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

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

            m = np.clip(np.floor(d / 10 ** e), a_min=0, a_max=5)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/stats/estimation.py on lines 1510..1510

    Duplicated Code

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

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

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

        is_even = np.mod(n_c + 1, 2)
    Severity: Major
    Found in src/wafo/misc.py and 5 other locations - About 1 hr to fix
    src/wafo/integrate.py on lines 252..252
    src/wafo/integrate.py on lines 345..345
    src/wafo/integrate.py on lines 511..511
    src/wafo/integrate.py on lines 614..614
    src/wafo/kdetools/gridding.py on lines 244..244

    Duplicated Code

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

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

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

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

        if clib is not None and method == 'clib':
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 1333..1333

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

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

        if clib is not None and method == 'clib':
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 995..995

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 18.

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

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

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

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

    Refactorings

    Further Reading

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

            n = np.broadcast_to(z, np.shape(k))
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/stats/_continuous_distns.py on lines 4669..4669
    src/wafo/stats/_continuous_distns.py on lines 4709..4709

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 18.

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

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

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

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

    Refactorings

    Further Reading

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

    def findrfc_astm(tp):
        """
        Return rainflow counted cycles
    
        Nieslony's Matlab implementation of the ASTM standard practice for rainflow
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/stats/estimation.py on lines 230..232

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 18.

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

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

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

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

    Refactorings

    Further Reading

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

    def index2sub(shape, index, order='C'):
        '''
        Returns Multiple subscripts from linear index.
    
        Parameters
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/stats/core.py on lines 28..31

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 18.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 17.

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

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

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

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

    Refactorings

    Further Reading

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

        xo, fo, x0 = np.atleast_1d(x, f, x0)
    Severity: Major
    Found in src/wafo/misc.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/sg_filter/_core.py on lines 1188..1189
    src/wafo/sg_filter/_core.py on lines 1188..1191
    src/wafo/sg_filter/_core.py on lines 1203..1203
    src/wafo/stats/_continuous_distns.py on lines 4632..4632
    src/wafo/stats/_continuous_distns.py on lines 4678..4678
    src/wafo/wave_theory/core.py on lines 329..329
    src/wafo/wave_theory/dispersion_relation.py on lines 147..147

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 17.

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

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

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

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

    Refactorings

    Further Reading

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

        delta = (stop - start) / 2.0
    Severity: Major
    Found in src/wafo/misc.py and 9 other locations - About 1 hr to fix
    src/wafo/integrate.py on lines 709..709
    src/wafo/integrate.py on lines 1204..1204
    src/wafo/integrate_oscillating.py on lines 129..129
    src/wafo/integrate_oscillating.py on lines 285..285
    src/wafo/integrate_oscillating.py on lines 419..419
    src/wafo/integrate_oscillating.py on lines 463..463
    src/wafo/kdetools/kernels.py on lines 1189..1189
    src/wafo/stats/estimation.py on lines 434..434
    src/wafo/stats/estimation.py on lines 435..435

    Duplicated Code

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

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

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

        angle_rad = angle_deg * pi / 180
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 2163..2163
    src/wafo/stats/_continuous_distns.py on lines 1847..1847
    src/wafo/stats/_continuous_distns.py on lines 6861..6861

    Duplicated Code

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

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

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

        min_n = nf if min_n is None else min_n
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 79..79
    src/wafo/misc.py on lines 2889..2889
    src/wafo/spectrum/core.py on lines 3254..3254

    Duplicated Code

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

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

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

        m = n if m is None else m
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 79..79
    src/wafo/misc.py on lines 2444..2444
    src/wafo/spectrum/core.py on lines 3254..3254

    Duplicated Code

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

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

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

        xx, yy, limits = _histogram(data, bins, range, density, weights)
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/tests/test_gaussian.py on lines 26..26
    src/wafo/wavemodels.py on lines 88..88
    src/wafo/wavemodels.py on lines 194..194

    Duplicated Code

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

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

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

        phir = phi * pi / 180.  # change from degrees to radians
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 427..427
    src/wafo/stats/_continuous_distns.py on lines 1847..1847
    src/wafo/stats/_continuous_distns.py on lines 6861..6861

    Duplicated Code

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

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

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

        maxiter = inf if maxiter is None else maxiter
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 2444..2444
    src/wafo/misc.py on lines 2889..2889
    src/wafo/spectrum/core.py on lines 3254..3254

    Duplicated Code

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

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

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

            d = float(mx - mn) / num_bins * 2
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/stats/core.py on lines 1139..1139
    src/wafo/stats/core.py on lines 1143..1143

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 17.

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

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

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

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

    Refactorings

    Further Reading

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

            min_h = 0.05 * (dmax - dmin)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/_misc_numba.py on lines 396..396
    src/wafo/sg_filter/_core.py on lines 351..351

    Duplicated Code

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

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

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

        n2 = (n - 1) // 2
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/demos.py on lines 35..35
    src/wafo/interpolate.py on lines 95..95

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 17.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

        def update(self, ** kwargs):
            self.__dict__.update(kwargs)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 732..733

    Duplicated Code

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

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

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

            dx = (dx + 2.) - 2.
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/stats/estimation.py on lines 1218..1218

    Duplicated Code

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

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

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

            out[k == 1] = log(n[k == 1])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/kdetools/kdetools.py on lines 993..993

    Duplicated Code

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

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

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

            y = gammaln(n1 + 1) - log(sqrt(2 * pi * n1) * (n1 / exp(1)) ** n1)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/spectrum/core.py on lines 3810..3810

    Duplicated Code

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

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

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

        prop = valid_props[name[:2]]
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/kdetools/kernels.py on lines 1314..1314

    Duplicated Code

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

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

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

        def __init__(self, **kwargs):
            self.__dict__.update(kwargs)
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 738..739

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 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

            tp = findtp(data1[iy], min_h)
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 1 hr to fix
    src/wafo/covariance/estimation.py on lines 167..167
    src/wafo/kdetools/kernels.py on lines 823..823
    src/wafo/kdetools/kernels.py on lines 915..915

    Duplicated Code

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

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

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

        _assert(fo.ndim == 1, 'f  must be a vector.')
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 2431..2431
    src/wafo/wave_theory/dispersion_relation.py on lines 156..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 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 3 locations. Consider refactoring.
    Open

        _assert(xo.ndim == 1, 'x must be a vector.')
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 1 hr to fix
    src/wafo/misc.py on lines 2432..2432
    src/wafo/wave_theory/dispersion_relation.py on lines 156..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 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

        if z is None:
            return x, y
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2366..2367

    Duplicated Code

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

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

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

        if z is None:
            return t, r
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 2336..2337

    Duplicated Code

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

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

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

                                  np.diff(fder[1, :]) / hn])
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/markov.py on lines 656..656

    Duplicated Code

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

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

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

        return np.vstack((x.ravel(), y.ravel(), z.ravel())).T, c_shape
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/wave_theory/dispersion_relation.py on lines 160..160

    Duplicated Code

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

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

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

            if verbose:
                print('Found {0:d} spurious negative jumps of {1}'.format(i_n.size,
                                                                          name))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 1681..1683

    Duplicated Code

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

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

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

            if verbose:
                print('Found {0:d} spurious positive jumps of {1}'.format(i_p.size,
                                                                          name))
    Severity: Major
    Found in src/wafo/misc.py and 1 other location - About 1 hr to fix
    src/wafo/misc.py on lines 1686..1688

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 16.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

        y = np.atleast_1d(x).ravel()
    Severity: Major
    Found in src/wafo/misc.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 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/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

        xn = np.asarray(x).flatten()
    Severity: Major
    Found in src/wafo/misc.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/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/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

        y = np.atleast_1d(tp).ravel()
    Severity: Major
    Found in src/wafo/misc.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 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/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 7 locations. Consider refactoring.
    Open

        for j in range(50):
            if num_tries < 5 and err > tol:
                err0 = err
                # find top errors
    
    
    Severity: Major
    Found in src/wafo/misc.py and 6 other locations - About 55 mins to fix
    src/wafo/misc.py on lines 1066..1066
    src/wafo/sg_filter/_core.py on lines 446..448
    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

            warnings.warn('No level v = %0.5g crossings found in x' % v)
    Severity: Major
    Found in src/wafo/misc.py and 6 other locations - About 55 mins to fix
    src/wafo/misc.py on lines 2282..2310
    src/wafo/sg_filter/_core.py on lines 446..448
    src/wafo/sg_filter/_core.py on lines 449..451
    src/wafo/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 6 locations. Consider refactoring.
    Open

            warnings.warn('Transformation of derivatives of order>4 is ' +
    Severity: Major
    Found in src/wafo/misc.py and 5 other locations - About 55 mins to fix
    src/wafo/covariance/core.py on lines 590..590
    src/wafo/spectrum/models.py on lines 579..580
    src/wafo/spectrum/models.py on lines 2001..2002
    src/wafo/stats/core.py on lines 1127..1129
    src/wafo/stats/estimation.py on lines 1616..1618

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

        corr = stirlerr(a) + stirlerr(b) - stirlerr(apb)
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 55 mins to fix
    src/wafo/integrate.py on lines 177..177
    src/wafo/spectrum/core.py on lines 171..171
    src/wafo/spectrum/core.py on lines 1134..1134

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

        y[n - L::] = y[n - L - 1]
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 55 mins to fix
    src/wafo/transform/estimation.py on lines 345..345
    src/wafo/transform/estimation.py on lines 349..349
    src/wafo/transform/estimation.py on lines 356..356

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

        L = float(xn - x0)
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 55 mins to fix
    src/wafo/spectrum/core.py on lines 189..189
    src/wafo/stats/_continuous_distns.py on lines 5140..5140
    src/wafo/stats/core.py on lines 1293..1293

    Duplicated Code

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

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

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

        def __init__(self, module_name):
            self._module_name = module_name
            self._module = None
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 55 mins to fix
    src/wafo/spectrum/models.py on lines 128..130
    src/wafo/win32_utils.py on lines 172..174

    Duplicated Code

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

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

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

            np.place(out, cond, func(*temp))
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 55 mins to fix
    src/wafo/misc.py on lines 288..288

    Duplicated Code

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

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

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

        xx = limits.repeat(3, axis=1)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 55 mins to fix
    src/wafo/misc.py on lines 2687..2687

    Duplicated Code

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

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

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

        yy = bin_.repeat(3, axis=1)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 55 mins to fix
    src/wafo/misc.py on lines 2683..2683

    Duplicated Code

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

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

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

        np.place(out, cond, f(*temp))
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 55 mins to fix
    src/wafo/misc.py on lines 332..332

    Duplicated Code

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

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

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 ind.size < 2:
            return None
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 55 mins to fix
    src/wafo/sg_filter/_core.py on lines 553..554

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 15.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 14.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 14.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 14.

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

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

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

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

    Refactorings

    Further Reading

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

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

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 14.

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

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

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

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

    Refactorings

    Further Reading

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

        if t > 1:
            f, n = np.frexp(t)
    Severity: Major
    Found in src/wafo/misc.py and 14 other locations - About 50 mins to fix
    src/wafo/integrate.py on lines 699..700
    src/wafo/kdetools/kernels.py on lines 810..810
    src/wafo/kdetools/kernels.py on lines 887..887
    src/wafo/kdetools/kernels.py on lines 1010..1010
    src/wafo/kdetools/kernels.py on lines 1117..1117
    src/wafo/kdetools/kernels.py on lines 1237..1237
    src/wafo/markov.py on lines 55..55
    src/wafo/objects.py on lines 107..107
    src/wafo/objects.py on lines 1803..1803
    src/wafo/objects.py on lines 1896..1896
    src/wafo/objects.py on lines 2096..2096
    src/wafo/spectrum/core.py on lines 817..817
    src/wafo/stats/_continuous_distns.py on lines 7008..7008
    src/wafo/stats/estimation.py on lines 424..424

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 14.

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

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

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

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

    Refactorings

    Further Reading

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

        yy = np.hstack((yy, 0.0))
    Severity: Major
    Found in src/wafo/misc.py and 11 other locations - About 50 mins to fix
    src/wafo/_misc_numba.py on lines 610..610
    src/wafo/_misc_numba.py on lines 614..614
    src/wafo/markov.py on lines 344..344
    src/wafo/markov.py on lines 366..366
    src/wafo/markov.py on lines 612..612
    src/wafo/markov.py on lines 613..613
    src/wafo/markov.py on lines 614..614
    src/wafo/stats/core.py on lines 893..894
    src/wafo/stats/estimation.py on lines 1527..1527
    src/wafo/wavemodels.py on lines 102..102
    src/wafo/wavemodels.py on lines 203..203

    Duplicated Code

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

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

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

    Tuning

    This issue has a mass of 14.

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

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

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

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

    Refactorings

    Further Reading

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

        _assert(0 < L, 'L must be positive')
    Severity: Major
    Found in src/wafo/misc.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/sg_filter/_core.py on lines 1125..1125

    Duplicated Code

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

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

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

        n += (np.mod(n, 2) == 0)  # make sure n is odd
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 50 mins to fix
    src/wafo/demos.py on lines 89..89
    src/wafo/demos.py on lines 91..91
    src/wafo/padua.py on lines 293..293

    Duplicated Code

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

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

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        yy[:, 0] = 0.0  # histogram
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 50 mins to fix
    src/wafo/stats/estimation.py on lines 1525..1525

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

    from numpy import (sqrt, arctan2, sin, cos, exp, log, log1p,
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 50 mins to fix
    src/wafo/transform/models.py on lines 10..10

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 36 locations. Consider refactoring.
    Open

                fy0 = np.interp(y, x, fx)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

            x = np.linspace(a, b, n)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

            y00 = np.interp(x, x0, y0)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

            fo = np.interp(xi, xo, fo)
    Severity: Major
    Found in src/wafo/misc.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/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/_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

        x = np.linspace(a, b, n)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

        x = np.linspace(a, b, n)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

        out = np.full(shape, fillvalue, dtype)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

            ind = _misc_numba.findrfc(y, h, method)
    Severity: Major
    Found in src/wafo/misc.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 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/_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

        ix = _misc_numba.findrfc(y, h, method)
    Severity: Major
    Found in src/wafo/misc.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 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/_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 10 locations. Consider refactoring.
    Open

            deg2rad = np.pi / 180
    Severity: Major
    Found in src/wafo/misc.py and 9 other locations - About 45 mins to fix
    src/wafo/doc/tutorial_scripts/chapter1.py on lines 81..81
    src/wafo/kdetools/kernels.py on lines 404..404
    src/wafo/kdetools/kernels.py on lines 409..409
    src/wafo/spectrum/models.py on lines 2125..2125
    src/wafo/stats/_continuous_distns.py on lines 4556..4556
    src/wafo/stats/_continuous_distns.py on lines 4612..4612
    src/wafo/tests/test_integrate_oscillating.py on lines 190..190
    src/wafo/tests/test_integrate_oscillating.py on lines 272..272
    src/wafo/tests/test_integrate_oscillating.py on lines 342..342

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

        xx, yy = _make_bars(limits, bin_)
    Severity: Major
    Found in src/wafo/misc.py and 10 other locations - About 45 mins to fix
    src/wafo/demos.py on lines 114..114
    src/wafo/gaussian.py on lines 344..344
    src/wafo/gaussian.py on lines 393..393
    src/wafo/misc.py on lines 2672..2672
    src/wafo/spectrum/core.py on lines 4112..4112
    src/wafo/spectrum/models.py on lines 319..319
    src/wafo/spectrum/models.py on lines 2078..2078
    src/wafo/stats/_continuous_distns.py on lines 8525..8525
    src/wafo/tests/test_misc.py on lines 429..429
    src/wafo/tests/test_misc.py on lines 441..441

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 11 locations. Consider refactoring.
    Open

        mn, mx = _default_range(range, data)
    Severity: Major
    Found in src/wafo/misc.py and 10 other locations - About 45 mins to fix
    src/wafo/demos.py on lines 114..114
    src/wafo/gaussian.py on lines 344..344
    src/wafo/gaussian.py on lines 393..393
    src/wafo/misc.py on lines 2723..2723
    src/wafo/spectrum/core.py on lines 4112..4112
    src/wafo/spectrum/models.py on lines 319..319
    src/wafo/spectrum/models.py on lines 2078..2078
    src/wafo/stats/_continuous_distns.py on lines 8525..8525
    src/wafo/tests/test_misc.py on lines 429..429
    src/wafo/tests/test_misc.py on lines 441..441

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

            elif kind in ('dw', 'uw', 'tw', 'cw'):
                # make sure that the first is a level v down-crossing
                #   if kind=='dw' or kind=='tw'
                # or that the first is a level v up-crossing
                #    if kind=='uw' or kind=='cw'
    Severity: Major
    Found in src/wafo/misc.py and 9 other locations - About 45 mins to fix
    src/wafo/kdetools/kernels.py on lines 703..704
    src/wafo/kdetools/kernels.py on lines 706..707
    src/wafo/markov.py on lines 157..158
    src/wafo/markov.py on lines 157..160
    src/wafo/objects.py on lines 329..339
    src/wafo/objects.py on lines 775..776
    src/wafo/objects.py on lines 1072..1076
    src/wafo/stats/_distn_infrastructure.py on lines 282..283
    src/wafo/stats/_distn_infrastructure.py on lines 423..424

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

        xx = xx[1:-1]
    Severity: Major
    Found in src/wafo/misc.py and 6 other locations - About 45 mins to fix
    src/wafo/misc.py on lines 1196..1197
    src/wafo/objects.py on lines 1808..1808
    src/wafo/objects.py on lines 1901..1901
    src/wafo/spectrum/core.py on lines 2639..2639
    src/wafo/spectrum/core.py on lines 2873..2873
    src/wafo/stats/core.py on lines 450..450

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 7 locations. Consider refactoring.
    Open

            if len(tp):
                ind = tp[1::2]  # extract indices to maxima only
    Severity: Major
    Found in src/wafo/misc.py and 6 other locations - About 45 mins to fix
    src/wafo/misc.py on lines 2685..2685
    src/wafo/objects.py on lines 1808..1808
    src/wafo/objects.py on lines 1901..1901
    src/wafo/spectrum/core.py on lines 2639..2639
    src/wafo/spectrum/core.py on lines 2873..2873
    src/wafo/stats/core.py on lines 450..450

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        fi = np.where(fi == n - 1, fi - 1, fi)
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 45 mins to fix
    src/wafo/markov.py on lines 368..368
    src/wafo/markov.py on lines 423..423
    src/wafo/markov.py on lines 429..429
    src/wafo/misc.py on lines 1204..1204

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            return '' if np.abs(den) == 1 else '/%d' % den
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 45 mins to fix
    src/wafo/misc.py on lines 2818..2818
    src/wafo/padua.py on lines 424..424
    src/wafo/wave_theory/dispersion_relation.py on lines 77..77
    src/wafo/wave_theory/dispersion_relation.py on lines 183..183

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

            if np.abs(num) == 1:
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 45 mins to fix
    src/wafo/misc.py on lines 2815..2815
    src/wafo/padua.py on lines 424..424
    src/wafo/wave_theory/dispersion_relation.py on lines 77..77
    src/wafo/wave_theory/dispersion_relation.py on lines 183..183

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        out[r00] = np.inf
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 45 mins to fix
    src/wafo/kdetools/kdetools.py on lines 1195..1195
    src/wafo/stats/_continuous_distns.py on lines 3750..3750
    src/wafo/stats/core.py on lines 498..498
    src/wafo/stats/core.py on lines 537..537

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

                elif iy == nrows - 1:
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 45 mins to fix
    src/wafo/markov.py on lines 368..368
    src/wafo/markov.py on lines 423..423
    src/wafo/markov.py on lines 429..429
    src/wafo/misc.py on lines 2597..2597

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            shape = arrays[0].shape
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 45 mins to fix
    src/wafo/integrate.py on lines 989..989
    src/wafo/kdetools/kdetools.py on lines 741..741
    src/wafo/misc.py on lines 240..240

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

        if nc < 1:
            return zeros(0, dtype=np.int)  # No RFC cycles*/
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/misc.py on lines 1331..1331

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            shape = condlist[0].shape
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 45 mins to fix
    src/wafo/integrate.py on lines 989..989
    src/wafo/kdetools/kdetools.py on lines 741..741
    src/wafo/misc.py on lines 246..246

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            return zeros(0, dtype=np.int)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/misc.py on lines 1325..1326

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

            return m * 10 ** e
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 45 mins to fix
    src/wafo/integrate_oscillating.py on lines 302..302
    src/wafo/stats/_continuous_distns.py on lines 2614..2614
    src/wafo/stats/estimation.py on lines 1515..1515

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            if remove_first:
                ind = ind[1::]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 45 mins to fix
    src/wafo/covariance/core.py on lines 695..695
    src/wafo/misc.py on lines 1082..1083

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                ind = ind[t_0::2]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 45 mins to fix
    src/wafo/gaussian.py on lines 342..342
    src/wafo/misc.py on lines 1072..1072

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        x, y, z = np.broadcast_arrays(*args[:3])
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 45 mins to fix
    src/wafo/graphutil.py on lines 243..243
    src/wafo/tests/test_gaussian.py on lines 46..46

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            mask_small = (np.abs(dxn) <= zcrit)
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 45 mins to fix
    src/wafo/stats/tests/test_fit.py on lines 109..109
    src/wafo/tests/test_integrate_oscillating.py on lines 313..313

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                ind = ind[t_0::2]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 45 mins to fix
    src/wafo/gaussian.py on lines 342..342
    src/wafo/misc.py on lines 1075..1075

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 13.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                if xor(first_is_down_crossing, kind in ('dw', 'tw')):
                    ind = ind[1::]
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 45 mins to fix
    src/wafo/covariance/core.py on lines 695..695
    src/wafo/misc.py on lines 1496..1497

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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(L == np.round(L), 'L must be an integer')
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/integrate.py on lines 979..979

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        indg, = np.nonzero(indg)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/stats/_distn_infrastructure.py on lines 81..81

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 = ('Numerical problems may occur for the derivatives in ' +
                       'tranproc.\n' +
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/stats/_continuous_distns.py on lines 4697..4698

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            xo = np.hstack((xo, x1 + xo[-1]))
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/misc.py on lines 2472..2472

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        return type(somedict)((k, somedict[k]) for k in somekeys if k in somedict)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/stats/_distn_infrastructure.py on lines 198..198

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            xo = np.hstack((x1 + xo[0], xo))
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/misc.py on lines 2478..2478

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        fmt = '{:0.' + '{:d}'.format(n) + 'g}'
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 45 mins to fix
    src/wafo/stats/_distn_infrastructure.py on lines 201..203

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 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 10 locations. Consider refactoring.
    Open

            fxder = _diff(xo, fo, x0, num_derivatives)
    Severity: Major
    Found in src/wafo/misc.py and 9 other locations - About 40 mins to fix
    src/wafo/integrate.py on lines 1319..1319
    src/wafo/kdetools/kernels.py on lines 926..926
    src/wafo/kdetools/kernels.py on lines 929..929
    src/wafo/markov.py on lines 407..407
    src/wafo/stats/_distn_infrastructure.py on lines 107..107
    src/wafo/stats/core.py on lines 440..440
    src/wafo/stats/core.py on lines 1370..1370
    src/wafo/stats/core.py on lines 1372..1372
    src/wafo/tests/test_padua.py on lines 80..80

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 12.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        a = zeros((m, p))
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 40 mins to fix
    src/wafo/misc.py on lines 2896..2896
    src/wafo/spectrum/core.py on lines 1411..1411
    src/wafo/spectrum/core.py on lines 3488..3491
    src/wafo/stats/core.py on lines 1280..1280

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 12.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        b = zeros((m, p))
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 40 mins to fix
    src/wafo/misc.py on lines 2895..2895
    src/wafo/spectrum/core.py on lines 1411..1411
    src/wafo/spectrum/core.py on lines 3488..3491
    src/wafo/stats/core.py on lines 1280..1280

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 12.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

                y.append(dfun(fxder, xi))
    Severity: Major
    Found in src/wafo/misc.py and 2 other locations - About 40 mins to fix
    src/wafo/containers.py on lines 530..530
    src/wafo/tests/test_integrate_oscillating.py on lines 319..319

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 12.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if i_n.size > 0:
                return np.hstack((i_p, i_n))
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 40 mins to fix
    src/wafo/interpolate.py on lines 170..170

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 12.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        return findcross(dx, 0.0) + 1
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 40 mins to fix
    src/wafo/spectrum/core.py on lines 3360..3360

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        axes[axis] = 0
    Severity: Major
    Found in src/wafo/misc.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 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/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 16 locations. Consider refactoring.
    Open

            indg[ind] = 0
    Severity: Major
    Found in src/wafo/misc.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 2009..2009
    src/wafo/sg_filter/_core.py on lines 257..257
    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 16 locations. Consider refactoring.
    Open

        if np.any(i_missing):
            xn[i_missing] = 0.  # set NaN's to zero
    Severity: Major
    Found in src/wafo/misc.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 1740..1740
    src/wafo/misc.py on lines 2009..2009
    src/wafo/sg_filter/_core.py on lines 257..257
    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 16 locations. Consider refactoring.
    Open

        shipchar[property_std] = 0
    Severity: Major
    Found in src/wafo/misc.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/sg_filter/_core.py on lines 257..257
    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 11 locations. Consider refactoring.
    Open

        length_err = length ** 0.13
    Severity: Major
    Found in src/wafo/misc.py and 10 other locations - About 35 mins to fix
    src/wafo/integrate.py on lines 480..480
    src/wafo/kdetools/kernels.py on lines 342..342
    src/wafo/sg_filter/demos.py on lines 163..163
    src/wafo/spectrum/core.py on lines 1995..1995
    src/wafo/spectrum/core.py on lines 2071..2071
    src/wafo/spectrum/core.py on lines 2147..2147
    src/wafo/spectrum/models.py on lines 1672..1672
    src/wafo/stats/_continuous_distns.py on lines 8372..8372
    src/wafo/stats/estimation.py on lines 1211..1212
    src/wafo/stats/estimation.py on lines 1219..1219

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

        draught_err = draught * 0.22
    Severity: Major
    Found in src/wafo/misc.py and 7 other locations - About 35 mins to fix
    src/wafo/misc.py on lines 1987..1987
    src/wafo/misc.py on lines 1994..1994
    src/wafo/spectrum/core.py on lines 3469..3469
    src/wafo/stats/_continuous_distns.py on lines 5975..5975
    src/wafo/stats/_continuous_distns.py on lines 6044..6044
    src/wafo/stats/_continuous_distns.py on lines 6045..6045
    src/wafo/tests/test_containers.py on lines 51..51

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 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

                if isinstance(func, Callable):
                    temp = tuple(np.extract(cond, arr) for arr in arrays) + args
                    np.place(out, cond, func(*temp, **kw))
                else:  # func is a scalar value or a array
                    np.putmask(out, cond, func)
    Severity: Major
    Found in src/wafo/misc.py and 9 other locations - About 35 mins to fix
    src/wafo/interpolate.py on lines 623..623
    src/wafo/sg_filter/_core.py on lines 1210..1210
    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 8 locations. Consider refactoring.
    Open

            delta = (stop - start) / float(num - 1)
    Severity: Major
    Found in src/wafo/misc.py and 7 other locations - About 35 mins to fix
    src/wafo/kdetools/kernels.py on lines 418..418
    src/wafo/markov.py on lines 219..219
    src/wafo/markov.py on lines 282..282
    src/wafo/markov.py on lines 1189..1189
    src/wafo/transform/models.py on lines 492..492
    src/wafo/transform/models.py on lines 492..492
    src/wafo/transform/models.py on lines 499..499

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

        beam_err = beam * 0.10
    Severity: Major
    Found in src/wafo/misc.py and 7 other locations - About 35 mins to fix
    src/wafo/misc.py on lines 1990..1990
    src/wafo/misc.py on lines 1994..1994
    src/wafo/spectrum/core.py on lines 3469..3469
    src/wafo/stats/_continuous_distns.py on lines 5975..5975
    src/wafo/stats/_continuous_distns.py on lines 6044..6044
    src/wafo/stats/_continuous_distns.py on lines 6045..6045
    src/wafo/tests/test_containers.py on lines 51..51

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

        axes[0] = axis
    Severity: Major
    Found in src/wafo/misc.py and 7 other locations - About 35 mins to fix
    src/wafo/spectrum/core.py on lines 1439..1439
    src/wafo/spectrum/core.py on lines 2063..2063
    src/wafo/spectrum/core.py on lines 2065..2065
    src/wafo/spectrum/core.py on lines 2135..2135
    src/wafo/spectrum/core.py on lines 2138..2138
    src/wafo/stats/_continuous_distns.py on lines 7034..7035
    src/wafo/stats/core.py on lines 1283..1283

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 8 locations. Consider refactoring.
    Open

        speed_err = speed * 0.10
    Severity: Major
    Found in src/wafo/misc.py and 7 other locations - About 35 mins to fix
    src/wafo/misc.py on lines 1987..1987
    src/wafo/misc.py on lines 1990..1990
    src/wafo/spectrum/core.py on lines 3469..3469
    src/wafo/stats/_continuous_distns.py on lines 5975..5975
    src/wafo/stats/_continuous_distns.py on lines 6044..6044
    src/wafo/stats/_continuous_distns.py on lines 6045..6045
    src/wafo/tests/test_containers.py on lines 51..51

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

            if np.mod(ind.size, 2) != 1:
                ind = ind[:-1]
    Severity: Major
    Found in src/wafo/misc.py and 5 other locations - About 35 mins to fix
    src/wafo/integrate.py on lines 992..992
    src/wafo/kdetools/kernels.py on lines 125..125
    src/wafo/markov.py on lines 387..387
    src/wafo/misc.py on lines 1090..1091
    src/wafo/tests/test_misc.py on lines 170..170

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 6 locations. Consider refactoring.
    Open

                if xor(is_odd, kind in ('dw', 'uw')):
                    ind = ind[:-1]
    Severity: Major
    Found in src/wafo/misc.py and 5 other locations - About 35 mins to fix
    src/wafo/integrate.py on lines 992..992
    src/wafo/kdetools/kernels.py on lines 125..125
    src/wafo/markov.py on lines 387..387
    src/wafo/misc.py on lines 1501..1502
    src/wafo/tests/test_misc.py on lines 170..170

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        nmax = 2 ** 20
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 35 mins to fix
    src/wafo/kdetools/demo.py on lines 221..221
    src/wafo/kdetools/demo.py on lines 222..222
    src/wafo/sg_filter/demos.py on lines 66..66
    src/wafo/sg_filter/tests/test_sg_filter.py on lines 12..12

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
    Open

        property_std = prop + 'STD'
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 35 mins to fix
    source/c_library/build_all.py on lines 16..16
    src/wafo/objects.py on lines 2510..2511
    src/wafo/spectrum/core.py on lines 1761..1761

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
    Open

        shape = kwds.get('shape')
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 35 mins to fix
    docs/conf.py on lines 149..149
    src/wafo/doc/tutorial_scripts/chapter2.py on lines 212..212
    src/wafo/transform/core.py on lines 40..40

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        r00 = (a == 0)
    Severity: Minor
    Found in src/wafo/misc.py and 2 other locations - About 35 mins to fix
    src/wafo/stats/_distn_infrastructure.py on lines 73..73
    src/wafo/stats/estimation.py on lines 1615..1615

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        if isinstance(seed, (numbers.Integral, np.integer)):
            return np.random.RandomState(seed)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 35 mins to fix
    src/wafo/kdetools/kdetools.py on lines 489..490

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

            if verbose:
                print('Found %d missing points' % i_missing.size)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 35 mins to fix
    src/wafo/misc.py on lines 1698..1699

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        expand_arr = (condition == condition)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 35 mins to fix
    src/wafo/spectrum/models.py on lines 1547..1547

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                if zcrit == 0.:
                    print('Found %d consecutive equal values' % i_small.size)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 35 mins to fix
    src/wafo/misc.py on lines 1673..1674

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        n500 = 500 < n1
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 35 mins to fix
    src/wafo/padua.py on lines 432..432

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 r'{0:s}\pi{1:s}'.format(_numerator_text(num),
                                           _denominator_text(den))
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 35 mins to fix
    src/wafo/spectrum/tests/test_models.py on lines 29..29

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 11.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 25 locations. Consider refactoring.
    Open

        nrows, mcols = data1.shape
    Severity: Major
    Found in src/wafo/misc.py and 24 other locations - About 30 mins to fix
    src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
    src/wafo/gaussian.py on lines 335..335
    src/wafo/gaussian.py on lines 717..717
    src/wafo/graphutil.py on lines 238..238
    src/wafo/kdetools/gridding.py on lines 230..230
    src/wafo/kdetools/gridding.py on lines 341..341
    src/wafo/kdetools/kdetools.py on lines 226..226
    src/wafo/kdetools/kdetools.py on lines 709..709
    src/wafo/kdetools/kdetools.py on lines 759..759
    src/wafo/kdetools/kdetools.py on lines 773..773
    src/wafo/kdetools/kdetools.py on lines 805..805
    src/wafo/kdetools/kernels.py on lines 755..755
    src/wafo/kdetools/kernels.py on lines 799..799
    src/wafo/kdetools/kernels.py on lines 885..885
    src/wafo/kdetools/kernels.py on lines 999..999
    src/wafo/kdetools/kernels.py on lines 1103..1103
    src/wafo/kdetools/kernels.py on lines 1230..1230
    src/wafo/misc.py on lines 2885..2885
    src/wafo/spectrum/core.py on lines 4114..4114
    src/wafo/stats/core.py on lines 951..951
    src/wafo/stats/core.py on lines 952..952
    src/wafo/stats/core.py on lines 953..953
    src/wafo/stats/core.py on lines 1253..1253
    src/wafo/stats/core.py on lines 1353..1353

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 25 locations. Consider refactoring.
    Open

        p, n = x.shape
    Severity: Major
    Found in src/wafo/misc.py and 24 other locations - About 30 mins to fix
    src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
    src/wafo/gaussian.py on lines 335..335
    src/wafo/gaussian.py on lines 717..717
    src/wafo/graphutil.py on lines 238..238
    src/wafo/kdetools/gridding.py on lines 230..230
    src/wafo/kdetools/gridding.py on lines 341..341
    src/wafo/kdetools/kdetools.py on lines 226..226
    src/wafo/kdetools/kdetools.py on lines 709..709
    src/wafo/kdetools/kdetools.py on lines 759..759
    src/wafo/kdetools/kdetools.py on lines 773..773
    src/wafo/kdetools/kdetools.py on lines 805..805
    src/wafo/kdetools/kernels.py on lines 755..755
    src/wafo/kdetools/kernels.py on lines 799..799
    src/wafo/kdetools/kernels.py on lines 885..885
    src/wafo/kdetools/kernels.py on lines 999..999
    src/wafo/kdetools/kernels.py on lines 1103..1103
    src/wafo/kdetools/kernels.py on lines 1230..1230
    src/wafo/misc.py on lines 1188..1188
    src/wafo/spectrum/core.py on lines 4114..4114
    src/wafo/stats/core.py on lines 951..951
    src/wafo/stats/core.py on lines 952..952
    src/wafo/stats/core.py on lines 953..953
    src/wafo/stats/core.py on lines 1253..1253
    src/wafo/stats/core.py on lines 1353..1353

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 10 locations. Consider refactoring.
    Open

        _assert(nargin in [1, 3], 'Number of arguments must be 1 or 3!')
    Severity: Major
    Found in src/wafo/misc.py and 9 other locations - About 30 mins to fix
    src/wafo/containers.py on lines 602..602
    src/wafo/integrate.py on lines 967..967
    src/wafo/integrate.py on lines 993..993
    src/wafo/markov.py on lines 157..157
    src/wafo/markov.py on lines 861..861
    src/wafo/spectrum/core.py on lines 1765..1765
    src/wafo/spectrum/core.py on lines 1999..1999
    src/wafo/spectrum/core.py on lines 2150..2150
    src/wafo/tests/test_misc.py on lines 168..168

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        bin_.shape = (-1, 1)
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 30 mins to fix
    src/wafo/misc.py on lines 2682..2682
    src/wafo/misc.py on lines 2894..2894
    src/wafo/sg_filter/_core.py on lines 159..160
    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

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        limits.shape = (-1, 1)
    Severity: Major
    Found in src/wafo/misc.py and 4 other locations - About 30 mins to fix
    src/wafo/misc.py on lines 2686..2686
    src/wafo/misc.py on lines 2894..2894
    src/wafo/sg_filter/_core.py on lines 159..160
    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

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

        t.shape = (1, -1)
    Severity: Major
    Found in src/wafo/misc.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/sg_filter/_core.py on lines 159..160
    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

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    def _discretize_linear(fun, a, b, tol=0.005, n=5):
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 30 mins to fix
    src/wafo/integrate.py on lines 136..136
    src/wafo/integrate.py on lines 324..324
    src/wafo/misc.py on lines 2268..2268

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

            try:
                return getattr(self._module, attr)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 30 mins to fix
    src/wafo/misc.py on lines 699..699

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

    Identical blocks of code found in 2 locations. Consider refactoring.
    Open

                    return getattr(self._module, attr)
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 30 mins to fix
    src/wafo/misc.py on lines 693..694

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    def _discretize_adaptive(fun, a, b, tol=0.005, n=5):
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 30 mins to fix
    src/wafo/integrate.py on lines 136..136
    src/wafo/integrate.py on lines 324..324
    src/wafo/misc.py on lines 2244..2244

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    def findcross(x, v=0.0, kind=None, method='clib'):
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 30 mins to fix
    src/wafo/kdetools/kernels.py on lines 265..265
    src/wafo/misc.py on lines 1397..1397
    src/wafo/spectrum/core.py on lines 4017..4017

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 4 locations. Consider refactoring.
    Open

    def findtp(x, h=0.0, kind=None, method='clib'):
    Severity: Major
    Found in src/wafo/misc.py and 3 other locations - About 30 mins to fix
    src/wafo/kdetools/kernels.py on lines 265..265
    src/wafo/misc.py on lines 1001..1001
    src/wafo/spectrum/core.py on lines 4017..4017

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

            dfuns = [_der_1, _der_2, _der_3, _der_4]
    Severity: Minor
    Found in src/wafo/misc.py and 2 other locations - About 30 mins to fix
    src/wafo/integrate.py on lines 1407..1407
    src/wafo/stats/_continuous_distns.py on lines 7031..7031

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        return strftime("%a, %d %b %Y %H:%M", gmtime())
    Severity: Minor
    Found in src/wafo/misc.py and 2 other locations - About 30 mins to fix
    src/wafo/misc.py on lines 437..438
    src/wafo/stats/core.py on lines 25..25

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

                         _find_spurious_jumps(ddxn, ddcrit, name='D^2x'),
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 30 mins to fix
    src/wafo/misc.py on lines 1733..1733

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 3 locations. Consider refactoring.
    Open

        if show_seconds:
            return strftime("%a, %d %b %Y %H:%M:%S", gmtime())
    Severity: Minor
    Found in src/wafo/misc.py and 2 other locations - About 30 mins to fix
    src/wafo/misc.py on lines 439..439
    src/wafo/stats/core.py on lines 25..25

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    def num2pistr(x, n=3, numerator_max=10, denominator_max=10):
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 30 mins to fix
    src/wafo/integrate.py on lines 770..770

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    def findpeaks(data, n=2, min_h=None, min_p=0.0):
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 30 mins to fix
    src/wafo/spectrum/core.py on lines 3287..3287

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

    Tuning

    This issue has a mass of 10.

    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

    Refactorings

    Further Reading

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

        ind = np.hstack((_find_spurious_jumps(dxn, dcrit, name='Dx'),
    Severity: Minor
    Found in src/wafo/misc.py and 1 other location - About 30 mins to fix
    src/wafo/misc.py on lines 1734..1734

    Duplicated Code

    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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