wafo-project/pywafo

View on GitHub
src/wafo/integrate_oscillating.py

Summary

Maintainability
F
3 wks
Test Coverage

Cyclomatic complexity is too high in method _QaL. (11)
Open

    def _QaL(self, s, a, b, omega, *args, **kwds):
        """if s>1,the integral is computed by Q_s^L"""
        scale = (b - a) / 2
        offset = (a + b) / 2
        prec = self.precision  # desired precision
Severity: Minor
Found in src/wafo/integrate_oscillating.py by radon

Cyclomatic Complexity

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

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

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

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

Cyclomatic complexity is too high in method _get_integration_limits. (9)
Open

    def _get_integration_limits(self, omega, args, kwds):
        a, b = self.a, self.b
        M = 30
        ab = [a]
        scale = (b - a) / 2
Severity: Minor
Found in src/wafo/integrate_oscillating.py by radon

Cyclomatic Complexity

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

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

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

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

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

    def _get_functions(self):
        a, b = self.a, self.b
        reverse = np.real(a) > np.real(b)
        if reverse:
            a, b = b, a
Severity: Minor
Found in src/wafo/integrate_oscillating.py by radon

Cyclomatic Complexity

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

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

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

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

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

    @staticmethod
    def _a_levin(omega, f, g, d_g, x, s, basis, *args, **kwds):

        def psi(t, k):
            return d_g(t, *args, **kwds) * basis(t, k)
Severity: Minor
Found in src/wafo/integrate_oscillating.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 class AdaptiveLevin. (6)
Open

class AdaptiveLevin(_Integrator):
    """Return integral for the Levin-type and adaptive Levin-type methods"""

    @staticmethod
    def _a_levin(omega, f, g, d_g, x, s, basis, *args, **kwds):
Severity: Minor
Found in src/wafo/integrate_oscillating.py by radon

Cyclomatic Complexity

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

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

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

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

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

    def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=15,
Severity: Major
Found in src/wafo/integrate_oscillating.py - About 1 hr to fix

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

        def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=8,
    Severity: Major
    Found in src/wafo/integrate_oscillating.py - About 50 mins to fix

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

          def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=1,
      Severity: Major
      Found in src/wafo/integrate_oscillating.py - About 50 mins to fix

        Function _a_levin has 9 arguments (exceeds 7 allowed). Consider refactoring.
        Open

            def _a_levin(self, omega, ff, gg, dgg, x, s, basis, *args, **kwds):
        Severity: Major
        Found in src/wafo/integrate_oscillating.py - About 45 mins to fix

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

          def osc_weights(omega, g, d_g, x, basis, a_b, *args, **kwds):
          Severity: Major
          Found in src/wafo/integrate_oscillating.py - About 35 mins to fix

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

                def _quad_osc(self, f, g, dg, a, b, omega, *args, **kwds):
            Severity: Major
            Found in src/wafo/integrate_oscillating.py - About 35 mins to fix

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

                  def _a_levin(omega, f, g, d_g, x, s, basis, *args, **kwds):
              Severity: Major
              Found in src/wafo/integrate_oscillating.py - About 35 mins to fix

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

                    def _a_levin(omega, f, g, d_g, x, s, basis, *args, **kwds):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

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

                def osc_weights(omega, g, d_g, x, basis, a_b, *args, **kwds):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

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

                    def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=8,
                                 precision=10, endpoints=False, full_output=False):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

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

                    def _quad_osc(self, f, g, dg, a, b, omega, *args, **kwds):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

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

                    def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=1,
                                 precision=10, endpoints=True, full_output=False):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

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

                    def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=15,
                                 precision=10, endpoints=False, full_output=False, maxiter=17):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

                Method "_a_levin" has 10 parameters, which is greater than the 7 authorized.
                Open

                    def _a_levin(self, omega, ff, gg, dgg, x, s, basis, *args, **kwds):

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

                Noncompliant Code Example

                With a maximum number of 4 parameters:

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

                Compliant Solution

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

                Remove this commented out code.
                Open

                            # x_n = tanh_sinh_open_nodes(self.s)

                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

                    # tmax = 3.18

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

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

                See

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

                Either remove or fill this block of code.
                Open

                            pass

                Most of the time a block of code is empty when a piece of code is really missing. So such empty block must be either filled or removed.

                Noncompliant Code Example

                for i in range(3):
                    pass
                

                Exceptions

                When a block contains a comment, this block is not considered to be empty.

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

                        if k >= 5:
                            q_v = np.hstack((q_0[k], q_1[k], q_2[k]))
                            q_w = np.hstack((q_0[k - 1], q_1[k - 1], q_2[k - 1]))
                        elif k >= 3:
                            q_v = np.hstack((q_0[k], q_1[k]))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 days to fix
                src/wafo/integrate.py on lines 1165..1173

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 204.

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

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

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

                def richardson(q_val, k):
                    # license BSD
                    # Richardson extrapolation with parameter estimation
                    c = np.real((q_val[k - 1] - q_val[k - 2]) / (q_val[k] - q_val[k - 1])) - 1.
                    # The lower bound 0.07 admits the singularity x.^-0.9
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 day to fix
                src/wafo/integrate.py on lines 1060..1066

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 139.

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

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

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

                See codeclimate-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 d_g_m11(t, *args, **kwds):
                            den = (1 - t**2)
                            return d_g(t / den, *args, **kwds) * (1 + t**2) / den ** 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 5 hrs to fix
                src/wafo/integrate_oscillating.py on lines 192..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 70.

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

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

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

                See codeclimate-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 f_m11(t, *args, **kwds):
                            den = (1 - t**2)
                            return f(t / den, *args, **kwds) * (1 + t**2) / den ** 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 5 hrs to fix
                src/wafo/integrate_oscillating.py on lines 200..202

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 70.

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

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

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

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

                            q_2[k] = dea3(q_1[k - 2], q_1[k - 1], q_1[k])[0]
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 256..256
                src/wafo/integrate_oscillating.py on lines 258..259

                Duplicated Code

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

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

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

                        elif k >= 2:
                            q_1[k] = dea3(q_0[k - 2], q_0[k - 1], q_0[k])[0]
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 256..256
                src/wafo/integrate_oscillating.py on lines 257..257

                Duplicated Code

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

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

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

                            q_1[k] = dea3(q_0[k - 2], q_0[k - 1], q_0[k])[0]
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 257..257
                src/wafo/integrate_oscillating.py on lines 258..259

                Duplicated Code

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

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

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

                        def f_01(t, *args, **kwds):
                            den = 1 - t
                            return f(a + t / den, *args, **kwds) / den ** 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 171..173

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                        def d_g_01(t, *args, **kwds):
                            den = 1 - t
                            return d_g(a + t / den, *args, **kwds) / den ** 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 164..166

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                        def f_m10(t, *args, **kwds):
                            den = 1 + t
                            return f(b + t / den, *args, **kwds) / den ** 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 185..187

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                        def d_g_m10(t, *args, **kwds):
                            den = 1 + t
                            return d_g(b + t / den, *args, **kwds) / den ** 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 4 hrs to fix
                src/wafo/integrate_oscillating.py on lines 178..180

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 52.

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

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

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

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

                Refactorings

                Further Reading

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

                    @staticmethod
                    def _get_num_points(s, prec, betam):
                        return 1 if s > 1 else int(prec / max(np.log10(betam + 1), 1) + 1)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 3 hrs to fix
                src/wafo/integrate_oscillating.py on lines 532..533

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 48.

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

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

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

                See codeclimate-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 _get_num_points(self, s, prec, betam):
                        return 8 if s > 1 else int(prec / max(np.log10(betam + 1), 1) + 1)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 3 hrs to fix
                src/wafo/integrate_oscillating.py on lines 457..459

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 48.

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

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

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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 a == b:
                            q_val = b - a
                            err = np.abs(b - a)
                            return q_val, err
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 3 hrs to fix
                src/wafo/integrate.py on lines 1243..1246

                Duplicated Code

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

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

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

                    def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=8,
                                 precision=10, endpoints=False, full_output=False):
                        super(EvansWebster,
                              self).__init__(f, g, dg=dg, a=a, b=b, basis=basis, s=s,
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 3 hrs to fix
                src/wafo/integrate_oscillating.py on lines 158..158

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 40.

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

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

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

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

                        super(QuadOsc, self).__init__(f, g, dg=dg, a=a, b=b, basis=basis, s=s,
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 3 hrs to fix
                src/wafo/integrate_oscillating.py on lines 519..522

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 40.

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

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

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

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

                Refactorings

                Further Reading

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

                        if self.endpoints:
                            if delta < 10 or alpha <= 10 or s > 1:
                                points = chebyshev_extrema
                            else:
                                points = adaptive_levin_points
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 hrs to fix
                src/wafo/integrate_oscillating.py on lines 482..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 39.

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

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

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

                See codeclimate-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 dgg(t, *args, **kwds):
                            return scale * self.dg(scale * t + offset, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 hrs to fix
                src/wafo/integrate_oscillating.py on lines 467..468

                Duplicated Code

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

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

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

                        def ff(t, *args, **kwds):
                            return scale * self.f(scale * t + offset, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 hrs to fix
                src/wafo/integrate_oscillating.py on lines 473..474

                Duplicated Code

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

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

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

                            x = np.hstack([x + a, x + b]) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 2 hrs to fix
                src/wafo/integrate.py on lines 1214..1214
                src/wafo/integrate_oscillating.py on lines 306..306

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 32.

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

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

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

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

                Refactorings

                Further Reading

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

                            a_b = np.hstack([a_b + a, a_b + b]) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 2 hrs to fix
                src/wafo/integrate.py on lines 1214..1214
                src/wafo/integrate_oscillating.py on lines 305..305

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 32.

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

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

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

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

                Refactorings

                Further Reading

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

                        def psi(t, k):
                            return d_g(t, *args, **kwds) * basis(t, k)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 hrs to fix
                src/wafo/integrate_oscillating.py on lines 93..94

                Duplicated Code

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

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

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

                Tuning

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

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

                    def psi(t, k):
                        return d_g(t, *args, **kwds) * basis(t, k)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 hrs to fix
                src/wafo/integrate_oscillating.py on lines 375..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 29.

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

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

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

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

                Refactorings

                Further Reading

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

                        x = (a + b) / 2 + hh * x_n      # Nodes
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 2 hrs to fix
                src/wafo/integrate.py on lines 1205..1205

                Duplicated Code

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

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

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

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

                        val0[0] = hh * np.sum(wq * lim_f(x, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 309..309

                Duplicated Code

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

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

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

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

                            val0[k] = hh * np.sum(wq * lim_f(x, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 296..296

                Duplicated Code

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

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

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

                        g_a = np.exp(j_w * lim_g(-1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 103..103
                src/wafo/integrate_oscillating.py on lines 106..106
                src/wafo/integrate_oscillating.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 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

                        g_b = np.exp(j_w * lim_g(1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 103..103
                src/wafo/integrate_oscillating.py on lines 106..106
                src/wafo/integrate_oscillating.py on lines 410..410

                Duplicated Code

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

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

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

                Tuning

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

                    b_1 = np.exp(j_w * lim_g(1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 106..106
                src/wafo/integrate_oscillating.py on lines 407..407
                src/wafo/integrate_oscillating.py on lines 410..410

                Duplicated Code

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

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

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

                Tuning

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

                    a_1 = np.exp(j_w * lim_g(-1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 103..103
                src/wafo/integrate_oscillating.py on lines 407..407
                src/wafo/integrate_oscillating.py on lines 410..410

                Duplicated Code

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

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

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

                Tuning

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

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

                def _assert_warn(cond, msg):
                    if not cond:
                        warnings.warn(msg)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 6 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 29..31
                src/wafo/kdetools/kdetools.py on lines 41..43
                src/wafo/kdetools/kernels.py on lines 27..29
                src/wafo/stats/estimation.py on lines 46..48
                src/wafo/transform/models.py on lines 43..45
                src/wafo/wave_theory/dispersion_relation.py on lines 22..24

                Duplicated Code

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

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

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

                        g_a = abs(omega * gg(-1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 475..475
                src/wafo/integrate_oscillating.py on lines 476..476
                src/wafo/integrate_oscillating.py on lines 478..478

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 23.

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

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

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

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

                Refactorings

                Further Reading

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

                        g_b = abs(omega * gg(1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 475..475
                src/wafo/integrate_oscillating.py on lines 476..476
                src/wafo/integrate_oscillating.py on lines 477..477

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 23.

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

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

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

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

                Refactorings

                Further Reading

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

                        dg_a = abs(omega * dgg(-1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 476..476
                src/wafo/integrate_oscillating.py on lines 477..477
                src/wafo/integrate_oscillating.py on lines 478..478

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 23.

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

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

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

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

                Refactorings

                Further Reading

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

                        dg_b = abs(omega * dgg(1, *args, **kwds))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 475..475
                src/wafo/integrate_oscillating.py on lines 477..477
                src/wafo/integrate_oscillating.py on lines 478..478

                Duplicated Code

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

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

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

                        k1 = np.flatnonzero(1 - np.isfinite(rhs))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/stats/estimation.py on lines 1156..1156
                src/wafo/wave_theory/core.py on lines 340..340

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 23.

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

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

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

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

                Refactorings

                Further Reading

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

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 22.

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

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

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

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

                Refactorings

                Further Reading

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

                        x0 = ecross(x, dg_x, i0, 0) if len(i0) else ()
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 430..430
                src/wafo/integrate_oscillating.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 22.

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

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

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

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

                Refactorings

                Further Reading

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

                        x1 = ecross(x, dg_x, i1, 1) if len(i1) else ()
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 431..431
                src/wafo/integrate_oscillating.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 22.

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

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

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

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

                Refactorings

                Further Reading

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

                        xm1 = ecross(x, dg_x, im1, -1) if len(im1) else ()
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 430..430
                src/wafo/integrate_oscillating.py on lines 431..431

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 22.

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

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

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

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

                Refactorings

                Further Reading

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

                    def __init__(self, f, g, dg=None, a=-1, b=1, basis=chebyshev_basis, s=1,
                                 precision=10, endpoints=True, full_output=False):
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 519..520

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 22.

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

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

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

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

                Refactorings

                Further Reading

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

                        errors = np.atleast_1d(abs(q_v - q_w))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate.py on lines 1175..1175

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 21.

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

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

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

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

                Refactorings

                Further Reading

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

                        return g(scale * t + offset, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 124..124

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 21.

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

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

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

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

                Refactorings

                Further Reading

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

                        return scale * d_g(scale * t + offset, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 121..121

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 21.

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

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

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

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

                Refactorings

                Further Reading

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

                            if np.isfinite(a) & np.isinf(b):
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 4 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 1131..1131
                src/wafo/integrate.py on lines 1135..1135
                src/wafo/integrate.py on lines 1138..1138
                src/wafo/integrate_oscillating.py on lines 221..221

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 19.

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

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

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

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

                Refactorings

                Further Reading

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

                            elif np.isinf(a) & np.isfinite(b):
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 4 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 1131..1131
                src/wafo/integrate.py on lines 1135..1135
                src/wafo/integrate.py on lines 1138..1138
                src/wafo/integrate_oscillating.py on lines 219..219

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 19.

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

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

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

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

                Refactorings

                Further Reading

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

                            return g(a + t / (1 - t), *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate.py on lines 1136..1136

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 19.

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

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

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

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

                Refactorings

                Further Reading

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

                            return g(b + t / (1 + t), *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate.py on lines 1139..1139

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 19.

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

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

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

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

                Refactorings

                Further Reading

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

                        reverse = np.real(a) > np.real(b)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate.py on lines 1236..1236

                Duplicated Code

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

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

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

                    @staticmethod
                    def eval(t, c):
                        return polynomial.polyval(t, c)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 36..38

                Duplicated Code

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

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

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

                    @staticmethod
                    def _derivative(c, m):
                        return polynomial.polyder(c, m)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 40..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 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

                    y = x[:k[0] + 1] if len(k) else x
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/objects.py on lines 2574..2574

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 19.

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

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

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

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

                Refactorings

                Further Reading

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

                    a_matrix = np.zeros((n, n), dtype=complex)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 384..384

                Duplicated Code

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

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

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

                            wq = osc_weights(omega, g, dg, x_n, basis, a_b, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 295..295

                Duplicated Code

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

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

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

                        wq = osc_weights(omega, g, dg, x_n, basis, a_b, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 307..307

                Duplicated Code

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

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

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

                        a_matrix = np.zeros((n, n), dtype=complex)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 98..98

                Duplicated Code

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

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

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

                        val1 = np.zeros((max_iter, 1), dtype=dtype)  # First extrapolation
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 289..289
                src/wafo/integrate_oscillating.py on lines 291..291

                Duplicated Code

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

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

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

                        val2 = np.zeros((max_iter, 1), dtype=dtype)  # Second extrapolation
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 289..289
                src/wafo/integrate_oscillating.py on lines 290..290

                Duplicated Code

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

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

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

                        val0 = np.zeros((max_iter, 1), dtype=dtype)  # Quadrature
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 290..290
                src/wafo/integrate_oscillating.py on lines 291..291

                Duplicated Code

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

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

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

                        scale = (b - a) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.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/kdetools/kernels.py on lines 1189..1189
                src/wafo/misc.py on lines 498..498
                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 10 locations. Consider refactoring.
                Open

                        scale = (b - a) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.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 463..463
                src/wafo/kdetools/kernels.py on lines 1189..1189
                src/wafo/misc.py on lines 498..498
                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 10 locations. Consider refactoring.
                Open

                        hh = (b - a) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.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 419..419
                src/wafo/integrate_oscillating.py on lines 463..463
                src/wafo/kdetools/kernels.py on lines 1189..1189
                src/wafo/misc.py on lines 498..498
                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 10 locations. Consider refactoring.
                Open

                        scale = (b - a) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.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 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/misc.py on lines 498..498
                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 5 locations. Consider refactoring.
                Open

                            q_val, err = self._extrapolate(k, val0, val1, val2)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 4 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 1190..1190
                src/wafo/integrate.py on lines 1219..1219
                src/wafo/integrate_oscillating.py on lines 266..266
                src/wafo/interpolate.py on lines 544..544

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 17.

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

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

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

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

                Refactorings

                Further Reading

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

                        q, err = self._get_best_estimate(k, q_0, q_1, q_2)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 4 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 1190..1190
                src/wafo/integrate.py on lines 1219..1219
                src/wafo/integrate_oscillating.py on lines 311..311
                src/wafo/interpolate.py on lines 544..544

                Duplicated Code

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

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

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

                        offset = (a + b) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 464..464
                src/wafo/spectrum/core.py on lines 1959..1959

                Duplicated Code

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

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

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

                        offset = (a + b) / 2
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 130..130
                src/wafo/spectrum/core.py on lines 1959..1959

                Duplicated Code

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

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

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

                        c = np.zeros(k + 1)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/interpolate.py on lines 879..879

                Duplicated Code

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

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

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

                        w = evans_webster_weights(omega, gg, dgg, x, basis, *args, **kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 1 hr to fix
                src/wafo/containers.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 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 7 locations. Consider refactoring.
                Open

                        solution = linalg.lstsq(a_matrix, rhs, rcond=-1)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 6 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 115..115
                src/wafo/interpolate.py on lines 1025..1025
                src/wafo/interpolate.py on lines 1127..1127
                src/wafo/interpolate.py on lines 1294..1294
                src/wafo/spectrum/core.py on lines 830..830
                src/wafo/stats/_continuous_distns.py on lines 2842..2842

                Duplicated Code

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

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

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

                    solution = linalg.lstsq(a_matrix, rhs, rcond=-1)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 6 other locations - About 1 hr to fix
                src/wafo/integrate_oscillating.py on lines 403..403
                src/wafo/interpolate.py on lines 1025..1025
                src/wafo/interpolate.py on lines 1127..1127
                src/wafo/interpolate.py on lines 1294..1294
                src/wafo/spectrum/core.py on lines 830..830
                src/wafo/stats/_continuous_distns.py on lines 2842..2842

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 16.

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

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

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

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

                Refactorings

                Further Reading

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

                        dff = Limit(nda.Derivative(f))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 10 other locations - About 55 mins to fix
                src/wafo/fig.py on lines 790..790
                src/wafo/fig.py on lines 791..791
                src/wafo/integrate_oscillating.py on lines 387..387
                src/wafo/spectrum/models.py on lines 119..119
                src/wafo/stats/_continuous_distns.py on lines 3793..3793
                src/wafo/stats/_continuous_distns.py on lines 3847..3847
                src/wafo/stats/_continuous_distns.py on lines 8280..8280
                src/wafo/stats/_continuous_distns.py on lines 8336..8336
                src/wafo/stats/_continuous_distns.py on lines 8337..8337
                src/wafo/stats/core.py on lines 1019..1019

                Duplicated Code

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

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

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

                Tuning

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

                        d_psi = Limit(nda.Derivative(psi))
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 10 other locations - About 55 mins to fix
                src/wafo/fig.py on lines 790..790
                src/wafo/fig.py on lines 791..791
                src/wafo/integrate_oscillating.py on lines 386..386
                src/wafo/spectrum/models.py on lines 119..119
                src/wafo/stats/_continuous_distns.py on lines 3793..3793
                src/wafo/stats/_continuous_distns.py on lines 3847..3847
                src/wafo/stats/_continuous_distns.py on lines 8280..8280
                src/wafo/stats/_continuous_distns.py on lines 8336..8336
                src/wafo/stats/_continuous_distns.py on lines 8337..8337
                src/wafo/stats/core.py on lines 1019..1019

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 15.

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

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

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

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

                Refactorings

                Further Reading

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

                        d_c = self._derivative(c, m=n)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 7 other locations - About 55 mins to fix
                src/wafo/kdetools/gridding.py on lines 220..220
                src/wafo/kdetools/kernels.py on lines 808..808
                src/wafo/kdetools/kernels.py on lines 1008..1008
                src/wafo/kdetools/kernels.py on lines 1112..1112
                src/wafo/objects.py on lines 2570..2570
                src/wafo/sg_filter/_core.py on lines 171..171
                src/wafo/stats/tests/test_fit.py on lines 93..93

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 15.

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

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

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

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

                Refactorings

                Further Reading

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

                    if np.isnan(a_1):
                        a_1 = 0.0
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 55 mins to fix
                src/wafo/integrate_oscillating.py on lines 104..105
                src/wafo/integrate_oscillating.py on lines 408..409
                src/wafo/integrate_oscillating.py on lines 411..412

                Duplicated Code

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

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

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

                        if np.isnan(g_a):
                            g_a = 0
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 55 mins to fix
                src/wafo/integrate_oscillating.py on lines 104..105
                src/wafo/integrate_oscillating.py on lines 107..108
                src/wafo/integrate_oscillating.py on lines 408..409

                Duplicated Code

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

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

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

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

                        err += 2 * np.finfo(q_val).eps
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 55 mins to fix
                src/wafo/integrate.py on lines 1231..1231

                Duplicated Code

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

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

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

                        if np.isnan(g_b):
                            g_b = 0
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 55 mins to fix
                src/wafo/integrate_oscillating.py on lines 104..105
                src/wafo/integrate_oscillating.py on lines 107..108
                src/wafo/integrate_oscillating.py on lines 411..412

                Duplicated Code

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

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

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

                    if np.isnan(b_1):
                        b_1 = 0.0
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 55 mins to fix
                src/wafo/integrate_oscillating.py on lines 107..108
                src/wafo/integrate_oscillating.py on lines 408..409
                src/wafo/integrate_oscillating.py on lines 411..412

                Duplicated Code

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

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

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

                        n = int(S[-2])
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 55 mins to fix
                src/wafo/stats/_distn_infrastructure.py on lines 433..433
                src/wafo/wavemodels.py on lines 106..106
                src/wafo/wavemodels.py on lines 206..206

                Duplicated Code

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

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

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

                        for ai, bi in zip(ab[:-1], ab[1:]):
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 55 mins to fix
                src/wafo/objects.py on lines 267..267

                Duplicated Code

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

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

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

                Tuning

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

                        a_b = np.hstack([a, b])
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 34 other locations - About 50 mins to fix
                src/wafo/integrate.py on lines 1160..1160
                src/wafo/kdetools/demo.py on lines 274..274
                src/wafo/kdetools/tests/test_gridding.py on lines 35..35
                src/wafo/markov.py on lines 62..62
                src/wafo/markov.py on lines 217..217
                src/wafo/markov.py on lines 273..273
                src/wafo/markov.py on lines 400..400
                src/wafo/markov.py on lines 498..498
                src/wafo/markov.py on lines 631..631
                src/wafo/markov.py on lines 800..800
                src/wafo/markov.py on lines 1170..1170
                src/wafo/markov.py on lines 1171..1171
                src/wafo/markov.py on lines 1175..1175
                src/wafo/markov.py on lines 1176..1176
                src/wafo/markov.py on lines 1185..1185
                src/wafo/markov.py on lines 1186..1186
                src/wafo/misc.py on lines 2300..2300
                src/wafo/misc.py on lines 2471..2471
                src/wafo/misc.py on lines 2477..2477
                src/wafo/misc.py on lines 2552..2552
                src/wafo/objects.py on lines 785..785
                src/wafo/objects.py on lines 1012..1012
                src/wafo/sg_filter/demos.py on lines 123..124
                src/wafo/sg_filter/demos.py on lines 172..172
                src/wafo/sg_filter/demos.py on lines 185..185
                src/wafo/spectrum/core.py on lines 1707..1707
                src/wafo/stats/core.py on lines 965..965
                src/wafo/stats/core.py on lines 972..972
                src/wafo/stats/core.py on lines 1281..1281
                src/wafo/stats/core.py on lines 1314..1314
                src/wafo/stats/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 4 locations. Consider refactoring.
                Open

                        _assert_warn(np.isfinite(q_val),
                                     'Integral approximation is Infinite or NaN.')
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 50 mins to fix
                src/wafo/integrate.py on lines 1227..1228
                src/wafo/sg_filter/_core.py on lines 1124..1124
                src/wafo/wave_theory/dispersion_relation.py on lines 88..92

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 14.

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

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

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

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

                Refactorings

                Further Reading

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

                        ab = self._get_integration_limits(omega, args, kwds)
                Severity: Major
                Found in src/wafo/integrate_oscillating.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 492..492
                src/wafo/interpolate.py on lines 574..574
                src/wafo/interpolate.py on lines 577..577
                src/wafo/kdetools/kdetools.py on lines 712..712
                src/wafo/kdetools/kernels.py on lines 820..820
                src/wafo/kdetools/kernels.py on lines 912..912
                src/wafo/kdetools/kernels.py on lines 1018..1018
                src/wafo/kdetools/kernels.py on lines 1139..1139
                src/wafo/kdetools/kernels.py on lines 1247..1247
                src/wafo/misc.py on lines 248..248
                src/wafo/misc.py on lines 1339..1339
                src/wafo/misc.py on lines 1393..1393
                src/wafo/misc.py on lines 2248..2248
                src/wafo/misc.py on lines 2260..2260
                src/wafo/misc.py on lines 2262..2262
                src/wafo/misc.py on lines 2273..2273
                src/wafo/misc.py on lines 2292..2292
                src/wafo/misc.py on lines 2461..2461
                src/wafo/objects.py on lines 446..446
                src/wafo/objects.py on lines 978..978
                src/wafo/sg_filter/_core.py on lines 429..429
                src/wafo/sg_filter/_core.py on lines 1167..1167
                src/wafo/sg_filter/_core.py on lines 1168..1168
                src/wafo/sg_filter/_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

                        m = self._get_num_points(s, prec, betam)
                Severity: Major
                Found in src/wafo/integrate_oscillating.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/interpolate.py on lines 574..574
                src/wafo/interpolate.py on lines 577..577
                src/wafo/kdetools/kdetools.py on lines 712..712
                src/wafo/kdetools/kernels.py on lines 820..820
                src/wafo/kdetools/kernels.py on lines 912..912
                src/wafo/kdetools/kernels.py on lines 1018..1018
                src/wafo/kdetools/kernels.py on lines 1139..1139
                src/wafo/kdetools/kernels.py on lines 1247..1247
                src/wafo/misc.py on lines 248..248
                src/wafo/misc.py on lines 1339..1339
                src/wafo/misc.py on lines 1393..1393
                src/wafo/misc.py on lines 2248..2248
                src/wafo/misc.py on lines 2260..2260
                src/wafo/misc.py on lines 2262..2262
                src/wafo/misc.py on lines 2273..2273
                src/wafo/misc.py on lines 2292..2292
                src/wafo/misc.py on lines 2461..2461
                src/wafo/objects.py on lines 446..446
                src/wafo/objects.py on lines 978..978
                src/wafo/sg_filter/_core.py on lines 429..429
                src/wafo/sg_filter/_core.py on lines 1167..1167
                src/wafo/sg_filter/_core.py on lines 1168..1168
                src/wafo/sg_filter/_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 6 locations. Consider refactoring.
                Open

                    tmax = np.arcsinh(np.arctanh(1 - _EPS) * 2 / np.pi)
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 5 other locations - About 45 mins to fix
                src/wafo/objects.py on lines 2473..2473
                src/wafo/stats/_continuous_distns.py on lines 3839..3839
                src/wafo/stats/_continuous_distns.py on lines 4604..4604
                src/wafo/stats/_continuous_distns.py on lines 7429..7429
                src/wafo/stats/_continuous_distns.py on lines 7566..7566

                Duplicated Code

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

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

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 v[1] * g_b - v[0] * g_a
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 4 other locations - About 45 mins to fix
                src/wafo/integrate_oscillating.py on lines 413..413
                src/wafo/spectrum/core.py on lines 962..962
                src/wafo/spectrum/models.py on lines 1244..1244
                src/wafo/stats/estimation.py on lines 85..85

                Duplicated Code

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

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

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

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

                Duplicated Code

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

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

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

                            n += nq * 2**k
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 3 other locations - About 45 mins to fix
                src/wafo/misc.py on lines 2667..2667
                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

                    x = piecewise([k < prm * m_1, k == np.ceil(prm * m_1)],
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 45 mins to fix
                src/wafo/covariance/core.py on lines 256..256
                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 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 np.asarray(w).ravel()
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 45 mins to fix
                src/wafo/fig.py on lines 219..219

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 13.

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

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

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

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

                Refactorings

                Further Reading

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

                        if reverse:
                            val = -val
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 45 mins to fix
                src/wafo/integrate.py on lines 1258..1259

                Duplicated Code

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

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

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

                    m_1 = int(np.floor(-np.log2(tmax / max(m - 1, 1)))) - 1
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 40 mins to fix
                src/wafo/integrate.py on lines 1333..1333
                src/wafo/spectrum/core.py on lines 1083..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 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

                        a_matrix[k] = (dbasis(x, k, n=1) + j_w * lim_psi(x, k))
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 40 mins to fix
                src/wafo/integrate_oscillating.py on lines 396..397

                Duplicated Code

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

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

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

                        f, g, dg = self.f, self.g, self.dg
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 40 mins to fix
                src/wafo/fig.py on lines 65..65

                Duplicated Code

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

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

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

                                    a_matrix[j, k] = (dbasis(t, k, n=order + 1) +
                                                      j_w * d_psi(t, k))
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 40 mins to fix
                src/wafo/integrate_oscillating.py on lines 113..113

                Duplicated Code

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

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

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 self.full_output:
                            return val, err
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 40 mins to fix
                src/wafo/sg_filter/_core.py on lines 570..571

                Duplicated Code

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

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

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

                        c[k] = 1
                Severity: Major
                Found in src/wafo/integrate_oscillating.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 401..401
                src/wafo/integrate_oscillating.py on lines 402..402
                src/wafo/interpolate.py on lines 784..784
                src/wafo/misc.py on lines 857..857
                src/wafo/misc.py on lines 1718..1719
                src/wafo/misc.py on lines 1740..1740
                src/wafo/misc.py on lines 2009..2009
                src/wafo/sg_filter/_core.py on lines 257..257
                src/wafo/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

                            rhs[k1] = 0
                Severity: Major
                Found in src/wafo/integrate_oscillating.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/interpolate.py on lines 784..784
                src/wafo/misc.py on lines 857..857
                src/wafo/misc.py on lines 1718..1719
                src/wafo/misc.py on lines 1740..1740
                src/wafo/misc.py on lines 2009..2009
                src/wafo/sg_filter/_core.py on lines 257..257
                src/wafo/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

                            a_matrix[k1] = 0
                Severity: Major
                Found in src/wafo/integrate_oscillating.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 402..402
                src/wafo/interpolate.py on lines 784..784
                src/wafo/misc.py on lines 857..857
                src/wafo/misc.py on lines 1718..1719
                src/wafo/misc.py on lines 1740..1740
                src/wafo/misc.py on lines 2009..2009
                src/wafo/sg_filter/_core.py on lines 257..257
                src/wafo/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 13 locations. Consider refactoring.
                Open

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

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 11.

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

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

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

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

                Refactorings

                Further Reading

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

                        if reverse:
                            a, b = b, a
                Severity: Major
                Found in src/wafo/integrate_oscillating.py and 4 other locations - About 35 mins to fix
                src/wafo/_misc_numba.py on lines 121..122
                src/wafo/stats/_continuous_distns.py on lines 712..715
                src/wafo/stats/_continuous_distns.py on lines 3627..3627
                src/wafo/stats/_continuous_distns.py on lines 5890..5890

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 11.

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

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

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

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

                Refactorings

                Further Reading

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

                        S[-1] = 0
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 2 other locations - About 35 mins to fix
                src/wafo/padua.py on lines 465..465
                src/wafo/padua.py on lines 510..510

                Duplicated Code

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

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

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

                        im10 = findcross(dg_x, -M)
                Severity: Minor
                Found in src/wafo/integrate_oscillating.py and 1 other location - About 30 mins to fix
                src/wafo/stats/_continuous_distns.py on lines 5422..5422

                Duplicated Code

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

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

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

                Tuning

                This issue has a mass of 10.

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

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

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

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

                Refactorings

                Further Reading

                Rename function "_g" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
                Open

                    def _g(t):

                Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

                Noncompliant Code Example

                With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

                def MyFunction(a,b):
                    ...
                

                Compliant Solution

                def my_function(a,b):
                    ...
                

                Rename function "ff" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
                Open

                        def ff(t, *args, **kwds):

                Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

                Noncompliant Code Example

                With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

                def MyFunction(a,b):
                    ...
                

                Compliant Solution

                def my_function(a,b):
                    ...
                

                Rename function "gg" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
                Open

                        def gg(t, *args, **kwds):

                Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

                Noncompliant Code Example

                With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

                def MyFunction(a,b):
                    ...
                

                Compliant Solution

                def my_function(a,b):
                    ...
                

                There are no issues that match your filters.

                Category
                Status