wafo-project/pywafo

View on GitHub
src/wafo/markov.py

Summary

Maintainability
F
3 wks
Test Coverage

Function mctp2tc has a Cognitive Complexity of 57 (exceeds 15 allowed). Consider refactoring.
Open

def mctp2tc(f_Mm, utc, param, f_mM=None):
    """
    MCTP2TC  Calculates frequencies for the  upcrossing troughs and crests
    using Markov chain of turning points.

Severity: Minor
Found in src/wafo/markov.py - About 7 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Function mctp2rfc has a Cognitive Complexity of 35 (exceeds 15 allowed). Consider refactoring.
Open

def mctp2rfc(fmM, fMm=None):
    """
    Return Rainflow matrix given a Markov chain of turning points

    computes f_rfc = f_mM + F_mct(f_mM).
Severity: Minor
Found in src/wafo/markov.py - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Cyclomatic complexity is too high in function mctp2tc. (14)
Open

def mctp2tc(f_Mm, utc, param, f_mM=None):
    """
    MCTP2TC  Calculates frequencies for the  upcrossing troughs and crests
    using Markov chain of turning points.

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

Cyclomatic Complexity

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

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

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

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

Cyclomatic complexity is too high in function mc2rfc. (14)
Open

def mc2rfc(f_xy, paramv=None, paramu=None):
    """
    MC2RFC  Calculates a rainflow matrix given a Markov chain with kernel f_xy;
           f_rfc = f_xy + F_mc(f_xy).

Severity: Minor
Found in src/wafo/markov.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 mc2rfc has a Cognitive Complexity of 32 (exceeds 15 allowed). Consider refactoring.
Open

def mc2rfc(f_xy, paramv=None, paramu=None):
    """
    MC2RFC  Calculates a rainflow matrix given a Markov chain with kernel f_xy;
           f_rfc = f_xy + F_mc(f_xy).

Severity: Minor
Found in src/wafo/markov.py - About 3 hrs to fix

Cognitive Complexity

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

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

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

Further reading

Cyclomatic complexity is too high in function mctp2rfc. (11)
Open

def mctp2rfc(fmM, fMm=None):
    """
    Return Rainflow matrix given a Markov chain of turning points

    computes f_rfc = f_mM + F_mct(f_mM).
Severity: Minor
Found in src/wafo/markov.py by radon

Cyclomatic Complexity

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

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

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

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

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

def cmatplot(cmat, ux=None, uy=None, method=1, clevels=None):
    """
    CMATPLOT Plots a cycle matrix, e.g. a rainflow matrix.

    CALL:  cmatplot(F)
Severity: Minor
Found in src/wafo/markov.py by radon

Cyclomatic Complexity

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

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

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

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

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

def mktestmat(param=(-1, 1, 32), x0=None, s=None, lam=1, numsubzero=0):
    """

    MKTESTMAT   Makes test matrices for min-max (and max-min) matrices.

Severity: Minor
Found in src/wafo/markov.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

Avoid deeply nested control flow statements.
Open

                    if norm != 0:
                        PmM[j, :] = PmM[j, :] / norm
                        e[j] = e[j] / norm
                    # end
                # end
Severity: Major
Found in src/wafo/markov.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if normA[j] != 0:
                            AA[j, :] = AA[j, :] / normA[j]
                            e[j] = e[j] / normA[j]
                        # end if
                    # end for
    Severity: Major
    Found in src/wafo/markov.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                          if nA == 1:
                              fx = NN * (A / (1 - B * A) * e)
                          else:
                              rh = np.eye(A.shape[0]) - np.dot(B, A)
                              # least squares
      Severity: Major
      Found in src/wafo/markov.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if nA == 1:
                                fx = NN / (1 - AA) * e
                            else:
                                # TODO CHECK this
                                fx = NN * np.linalg.solve((I - AA), e)[0]  # (I-AA)\e
        Severity: Major
        Found in src/wafo/markov.py - About 45 mins to fix

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

          def mctp2rfc(fmM, fMm=None):
          Severity: Critical
          Found in src/wafo/markov.py by sonar-python

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

          See

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

          def mctp2tc(f_Mm, utc, param, f_mM=None):
          Severity: Critical
          Found in src/wafo/markov.py by sonar-python

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

          See

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

          def mc2rfc(f_xy, paramv=None, paramu=None):
          Severity: Critical
          Found in src/wafo/markov.py by sonar-python

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

          See

          Remove this commented out code.
          Open

                  # j = np.r_[1:n]
          Severity: Major
          Found in src/wafo/markov.py by sonar-python

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

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

          See

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

          Remove this commented out code.
          Open

              for k in range(n - 1):  # k = subdiagonal
          Severity: Major
          Found in src/wafo/markov.py by sonar-python

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

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

          See

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

          Remove this commented out code.
          Open

                  for i in range(n - k):  # i = minimum
          Severity: Major
          Found in src/wafo/markov.py by sonar-python

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

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

          See

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

          TODO found
          Open

                                  # TODO CHECK this
          Severity: Minor
          Found in src/wafo/markov.py by fixme

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

                      Min_rfc[i] = (Sminus[i] - dd[i]) * \
                          (Sminus[i] - dd[i]) / (1 - dd[i] / Spm) / Spm
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 6 hrs to fix
          src/wafo/markov.py on lines 618..619

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 83.

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

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

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

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

          Refactorings

          Further Reading

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

                      Max_rfc[i] = (Splus[i] - dd[i]) * \
                          (Splus[i] - dd[i]) / (1 - dd[i] / Spm) / Spm
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 6 hrs to fix
          src/wafo/markov.py on lines 620..621

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 83.

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

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

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

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

                      AA1 = f_Mm[N - 1 - k:N - 1 - k + i, k - i:k]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 4 hrs to fix
          src/wafo/markov.py on lines 503..503
          src/wafo/markov.py on lines 505..505

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 56.

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

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

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

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

          Refactorings

          Further Reading

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

                      AA = f_mM[N - 1 - k:N - 1 - k + i, k - i:k]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 4 hrs to fix
          src/wafo/markov.py on lines 504..504
          src/wafo/markov.py on lines 505..505

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 56.

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

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

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

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

          Refactorings

          Further Reading

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

                      RAA = f_rfc[N - 1 - k:N - 1 - k + i, k - i:k]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 4 hrs to fix
          src/wafo/markov.py on lines 503..503
          src/wafo/markov.py on lines 504..504

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 56.

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

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

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

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

          Refactorings

          Further Reading

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

                      RAA = f_rfc[N - k:N - k + i, :][:, k - i:k]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 3 hrs to fix
          src/wafo/markov.py on lines 640..640

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 51.

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

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

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

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

          Refactorings

          Further Reading

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

                      AA = f_xy[N - k:N - k + i, :][:, k - i:k]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 3 hrs to fix
          src/wafo/markov.py on lines 642..642

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 51.

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

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

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

          See codeclimate-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 method == 1:      # mesh
                  F = np.flipud(F.T)  # Vrid cykelmatrisen for att plotta rett
                  plt.mesh(ux, np.fliplr(uy), F)
                  plt.xlabel('min')
                  plt.ylabel('Max')
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 3 hrs to fix
          src/wafo/markov.py on lines 889..893

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 49.

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

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

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

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

          Refactorings

          Further Reading

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

              elif method == 2:  # surf
                  F = np.flipud(F.T)  # Vrid cykelmatrisen for att plotta rett
                  plt.surf(ux, np.fliplr(uy), F)
                  plt.xlabel('min')
                  plt.ylabel('Max')
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 3 hrs to fix
          src/wafo/markov.py on lines 881..885

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 49.

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

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

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

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

          Refactorings

          Further Reading

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

                      if dim_m == 1:
                          tempm[0] = (Bm / (1 - Am * Bm) * em)
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 352..353

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 35.

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

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

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

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

          Refactorings

          Further Reading

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

                      if dim_p == 1:
                          tempp[0] = (Ap / (1 - Bp * Ap) * e)
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 374..375

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 35.

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

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

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

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

          Refactorings

          Further Reading

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

              f_rfc[N - 2, 0] = f_max[N - 2]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 632..632

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 32.

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

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

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

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

          Refactorings

          Further Reading

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

              f_rfc[N - 1, 1] = Max_rfc[N - 1]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 499..499

          Duplicated Code

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

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

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

          Tuning

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

                      normA = norm[N - k:N - k + i]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 2 hrs to fix
          src/wafo/markov.py on lines 645..645
          src/wafo/markov.py on lines 646..646
          src/wafo/markov.py on lines 648..648

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 31.

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

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

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

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

          Refactorings

          Further Reading

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

                      MA = Splus[N - k:N - k + i]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 2 hrs to fix
          src/wafo/markov.py on lines 646..646
          src/wafo/markov.py on lines 647..647
          src/wafo/markov.py on lines 648..648

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 31.

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

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

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

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

          Refactorings

          Further Reading

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

                      MA_rfc = Max_rfc[N - k:N - k + i]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 2 hrs to fix
          src/wafo/markov.py on lines 645..645
          src/wafo/markov.py on lines 646..646
          src/wafo/markov.py on lines 647..647

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 31.

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

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

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

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

          Refactorings

          Further Reading

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

                      mA = Sminus[N - k:N - k + i]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 2 hrs to fix
          src/wafo/markov.py on lines 645..645
          src/wafo/markov.py on lines 647..647
          src/wafo/markov.py on lines 648..648

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 31.

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

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

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

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

          Refactorings

          Further Reading

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

                                  PmM[j, :] = PmM[j, :] / norm
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 484..485

          Duplicated Code

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

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

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

                      if norm != 0:
                          PMm[j, :] = PMm[j, :] / norm
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 524..524

          Duplicated Code

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

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

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

                          f_rfc[N - 1 - k, k - i] = 0.0
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.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 28.

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

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

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

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

          Refactorings

          Further Reading

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

                          f_rfc[N - 1 - k, k - i] = fx + DRFC
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 549..549

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 28.

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

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

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

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

          Refactorings

          Further Reading

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

                          F[i, n - j - 1] = F[i, n - j - 1] + a + b + c
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 430..430

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 28.

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

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

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

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

          Refactorings

          Further Reading

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

                          F[i, n - j - 1] = F[i, n - j - 1] + c
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 2 hrs to fix
          src/wafo/markov.py on lines 421..421

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 28.

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

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

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

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

          Refactorings

          Further Reading

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

              if uy is None:
                  uy = np.arange(shape[0])  # Antalet rader
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 853..854

          Duplicated Code

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

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

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

          def iter_mc(frfc, fmM_0=None, k=1, epsilon=1e-5):
              """
              ITER_MC  Calculates a kernel of a MC given a rainflow matrix
          
                  Solves  f_rfc = f_xy + F_mc(f_xy) for f_xy.
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 69..99

          Duplicated Code

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

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

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

              if ux is None:
                  ux = np.arange(shape[1])  # Antalet kolumner
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 856..857

          Duplicated Code

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

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

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

          def iter_(frfc, fmM_0=None, k=1, epsilon=1e-5):
              """
              ITER  Calculates a Markov matrix given a rainflow matrix
          
               CALL: [fmM_k frfc_k] = iter_(frfc, fmM_0, k, eps)
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 125..153

          Duplicated Code

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

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

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

                  m0 = max(0, f_min[0] - np.sum(f_rfc[N - k + 1:N, 0]))
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 697..697

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 26.

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

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

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

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

          Refactorings

          Further Reading

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

                  m0 = np.maximum(0, Min_rfc[N] - sum(f_rfc[N - k + 1:N, 0]))
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 552..552

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 26.

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

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

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

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

          Refactorings

          Further Reading

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

              m2[1:, 1:] = m1[:n - 2, :][:, 1:]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 29..30

          Duplicated Code

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

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

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

                                  max(np.abs(NN)) > 1e-6 * max(MA[0], mA[0])):
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 516..516

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 24.

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

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

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

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

          Refactorings

          Further Reading

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

                      if NT > 1e-6 * max(MA[0], mA[0]):
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 530..530

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 24.

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

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

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

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

          Refactorings

          Further Reading

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

              F[:ntc - 1, :(n - ntc)] = f_mM[:ntc - 1, :(n - ntc)]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 401..401

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 24.

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

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

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

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

          Refactorings

          Further Reading

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

                  fr[:n - 1, :n - 1] = fr_raw
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/spectrum/core.py on lines 2407..2407

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 24.

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

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

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

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

          Refactorings

          Further Reading

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

                      if rowsum != 0:
                          arr[i] = arr[i] / rowsum
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 525..525

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 23.

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

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

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

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

          Refactorings

          Further Reading

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

                          tempm = np.dot(Bm, np.linalg.lstsq(rh, em)[0])
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/stats/core.py on lines 1009..1009

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 23.

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

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

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

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

          Refactorings

          Further Reading

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

                                  e[j] = e[j] / norm
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 336..337

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 23.

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

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

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

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

          Refactorings

          Further Reading

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

                          e = (mA - np.sum(AA, axis=0))  # T
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 517..517

          Duplicated Code

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

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

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

                          NN = MA - np.sum(AA, axis=1)  # T
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 518..518

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 21.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 20.

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

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

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

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

          Refactorings

          Further Reading

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

                          AA = AA - 0.5 * np.diag(np.diag(AA))
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 1 hr to fix
          src/wafo/sg_filter/_core.py on lines 1166..1166
          src/wafo/sg_filter/_core.py on lines 1200..1200
          src/wafo/stats/_continuous_distns.py on lines 4490..4490
          src/wafo/stats/_continuous_distns.py on lines 4666..4666

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 19.

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

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

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

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

          Refactorings

          Further Reading

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

                          e = (np.fliplr(mA) - np.sum(AA)).T
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 1 hr to fix
          src/wafo/stats/_continuous_distns.py on lines 2987..2987
          src/wafo/stats/_continuous_distns.py on lines 6778..6778
          src/wafo/transform/core.py on lines 195..195

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 19.

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

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

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

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

          Refactorings

          Further Reading

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

                              norm = mA[nA - 1 - j]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 553..553
          src/wafo/markov.py on lines 560..560

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 19.

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

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

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

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

          Refactorings

          Further Reading

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

                  M0 = max(0, f_max[N - 1 - k] - np.sum(f_rfc[N - 1 - k, 1:k]))
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 522..522
          src/wafo/markov.py on lines 560..560

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 19.

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

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

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

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

          Refactorings

          Further Reading

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

                  m0 = max(0, f_min[N - 1 - k] - np.sum(f_rfc[1:k + 1, N - 1 - k]))
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 522..522
          src/wafo/markov.py on lines 553..553

          Duplicated Code

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

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

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

                  x0 = np.ones((2,)) * (param[1] + param[0]) / 2
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/integrate.py on lines 1271..1271

          Duplicated Code

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

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

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

              f_mM, f_Mm = fmM.copy(), fMm.copy()
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/kdetools/kdetools.py on lines 1006..1006

          Duplicated Code

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

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

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

                  converged = not np.sum(np.abs(fmM_old - fmM)) > epsilon
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/stats/distributions.py on lines 66..66

          Duplicated Code

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

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

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

              MAX = np.sum(np.triu(Frfc), axis=0) + np.sum(np.tril(Frfc).T, axis=0)
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 1180..1180

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 19.

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

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

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

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

          Refactorings

          Further Reading

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

                  Spm = Sminus[i] + Splus[i] - dd[i]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/objects.py on lines 2607..2607

          Duplicated Code

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

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

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

              MIN = np.sum(np.triu(Frfc).T, axis=0) + np.sum(np.tril(Frfc), axis=0)
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 1181..1181

          Duplicated Code

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

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

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

                                  e[j] = e[j] / normA[j]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/spectrum/core.py on lines 3787..3787

          Duplicated Code

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

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

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

                          if np.max(
                                  np.abs(e)) > 1e-7 and np.max(np.abs(NN)) > 1e-7 * MA_rfc[0]:
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/objects.py on lines 2568..2568

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 19.

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

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

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

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

          Refactorings

          Further Reading

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

                          rh = Im - np.dot(Am, Bm)
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/doc/tutorial_scripts/chapter5.py on lines 112..112
          src/wafo/markov.py on lines 355..355

          Duplicated Code

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

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

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

          Tuning

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

                          rh = I - np.dot(Bp, Ap)
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/doc/tutorial_scripts/chapter5.py on lines 112..112
          src/wafo/markov.py on lines 377..377

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 18.

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

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

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

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

          Refactorings

          Further Reading

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

                  for j in range(ntc - 1, n - 1):
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/spectrum/core.py on lines 3465..3465

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 18.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

              if n != m:
                  raise ValueError('The matrix is not square!')
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 1 hr to fix
          src/wafo/gaussian.py on lines 340..341
          src/wafo/interpolate.py on lines 553..556
          src/wafo/stats/core.py on lines 910..911

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

                          tempp = np.dot(Ap, np.linalg.solve(rh, e))
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 541..541
          src/wafo/stats/core.py on lines 1127..1127

          Duplicated Code

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

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

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

                  dim_m = j - ntc + 1
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/spectrum/core.py on lines 1435..1435
          src/wafo/stats/core.py on lines 367..367

          Duplicated Code

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

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

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

                                  fx = np.dot(NN, np.dot(A, np.linalg.solve(rh, e)))
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 356..356
          src/wafo/stats/core.py on lines 1127..1127

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

              if f_mM is None:
                  f_mM = np.copy(f_Mm) * 1.0
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/graphutil.py on lines 266..266

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

              if n < 3:
                  raise ValueError('The dimension must be 3 or larger!')
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/demos.py on lines 86..87

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 17.

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

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

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

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

          Refactorings

          Further Reading

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

                              F[i, n - k - 1] = F[i, n - ntc]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 424..424
          src/wafo/markov.py on lines 424..424

          Duplicated Code

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

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

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

          Tuning

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

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

                          F[i, n - ntc] = F[i, n - ntc] + b
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 1 hr to fix
          src/wafo/markov.py on lines 424..424
          src/wafo/markov.py on lines 426..426

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 16.

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

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

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

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

          Refactorings

          Further Reading

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

                  c = nt[I + 1][:, J - 1] - nt[I][:, J - 1] - nt[I + 1][:, J] + nt[I][:, J]
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 1 hr to fix
          src/wafo/covariance/core.py on lines 501..501
          src/wafo/covariance/core.py on lines 501..501
          src/wafo/covariance/core.py on lines 502..502
          src/wafo/stats/core.py on lines 1285..1285

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 16.

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

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

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

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

          Refactorings

          Further Reading

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

                      NT = MA_rfc[0] - np.sum(RAA[0, :])
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/misc.py on lines 2557..2557

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 16.

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

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

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

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

          Refactorings

          Further Reading

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

              f_rfc[0, N - 2] = f_min[N - 2]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 633..633

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 16.

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

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

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

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

          Refactorings

          Further Reading

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

              f_rfc[1, N - 1] = Min_rfc[2]
          Severity: Major
          Found in src/wafo/markov.py and 1 other location - About 1 hr to fix
          src/wafo/markov.py on lines 500..500

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 16.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

              frfc = np.fliplr(fun2rfc(fmM))
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 55 mins to fix
          src/wafo/kdetools/gridding.py on lines 66..66
          src/wafo/kdetools/kdetools.py on lines 439..439
          src/wafo/kdetools/kdetools.py on lines 463..463
          src/wafo/markov.py on lines 345..345
          src/wafo/markov.py on lines 367..367
          src/wafo/markov.py on lines 611..611
          src/wafo/sg_filter/demos.py on lines 281..281
          src/wafo/stats/core.py on lines 438..439
          src/wafo/stats/core.py on lines 584..585

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                  I = np.eye(len(Ap))
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 55 mins to fix
          src/wafo/kdetools/gridding.py on lines 66..66
          src/wafo/kdetools/kdetools.py on lines 439..439
          src/wafo/kdetools/kdetools.py on lines 463..463
          src/wafo/markov.py on lines 120..120
          src/wafo/markov.py on lines 367..367
          src/wafo/markov.py on lines 611..611
          src/wafo/sg_filter/demos.py on lines 281..281
          src/wafo/stats/core.py on lines 438..439
          src/wafo/stats/core.py on lines 584..585

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

              Sminus = np.fliplr(sum(f_xy))
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 55 mins to fix
          src/wafo/kdetools/gridding.py on lines 66..66
          src/wafo/kdetools/kdetools.py on lines 439..439
          src/wafo/kdetools/kdetools.py on lines 463..463
          src/wafo/markov.py on lines 120..120
          src/wafo/markov.py on lines 345..345
          src/wafo/markov.py on lines 367..367
          src/wafo/sg_filter/demos.py on lines 281..281
          src/wafo/stats/core.py on lines 438..439
          src/wafo/stats/core.py on lines 584..585

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                  Im = np.eye(len(Am))
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 55 mins to fix
          src/wafo/kdetools/gridding.py on lines 66..66
          src/wafo/kdetools/kdetools.py on lines 439..439
          src/wafo/kdetools/kdetools.py on lines 463..463
          src/wafo/markov.py on lines 120..120
          src/wafo/markov.py on lines 345..345
          src/wafo/markov.py on lines 611..611
          src/wafo/sg_filter/demos.py on lines 281..281
          src/wafo/stats/core.py on lines 438..439
          src/wafo/stats/core.py on lines 584..585

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                          PmM = np.rot90(AA.copy())
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 55 mins to fix
          src/wafo/kdetools/kernels.py on lines 124..124
          src/wafo/objects.py on lines 720..720
          src/wafo/spectrum/core.py on lines 1455..1455
          src/wafo/stats/_continuous_distns.py on lines 5123..5123

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                  j = np.r_[1:n]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 55 mins to fix
          src/wafo/markov.py on lines 212..212
          src/wafo/objects.py on lines 2494..2494

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                  J = np.r_[1:n]
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 55 mins to fix
          src/wafo/markov.py on lines 218..218
          src/wafo/objects.py on lines 2494..2494

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                  if max(abs(e)) > 1e-10:
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 55 mins to fix
          src/wafo/markov.py on lines 373..373

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 15.

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

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

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

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

          Refactorings

          Further Reading

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

                  if max(abs(em)) > 1e-10:
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 55 mins to fix
          src/wafo/markov.py on lines 351..351

          Duplicated Code

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

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

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

          Tuning

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

              m2 = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              f_rfc = np.zeros((N, N))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

                  cmat = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              nt = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              F = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              f_rfc = np.zeros((N, N))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              F = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              EYE = np.eye((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 800..800
          src/wafo/markov.py on lines 1170..1170
          src/wafo/markov.py on lines 1171..1171
          src/wafo/markov.py on lines 1175..1175
          src/wafo/markov.py on lines 1176..1176
          src/wafo/markov.py on lines 1185..1185
          src/wafo/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 35 locations. Consider refactoring.
          Open

              Qrh = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 800..800
          src/wafo/markov.py on lines 1170..1170
          src/wafo/markov.py on lines 1171..1171
          src/wafo/markov.py on lines 1175..1175
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              Q = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 800..800
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              Qh = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 800..800
          src/wafo/markov.py on lines 1170..1170
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              Qr = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 800..800
          src/wafo/markov.py on lines 1170..1170
          src/wafo/markov.py on lines 1171..1171
          src/wafo/markov.py on lines 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 35 locations. Consider refactoring.
          Open

              F = np.zeros((n, n))
          Severity: Major
          Found in src/wafo/markov.py and 34 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 1160..1160
          src/wafo/integrate_oscillating.py on lines 294..294
          src/wafo/kdetools/demo.py on lines 274..274
          src/wafo/kdetools/tests/test_gridding.py on lines 35..35
          src/wafo/markov.py on lines 62..62
          src/wafo/markov.py on lines 217..217
          src/wafo/markov.py on lines 273..273
          src/wafo/markov.py on lines 400..400
          src/wafo/markov.py on lines 498..498
          src/wafo/markov.py on lines 631..631
          src/wafo/markov.py on lines 800..800
          src/wafo/markov.py on lines 1170..1170
          src/wafo/markov.py on lines 1171..1171
          src/wafo/markov.py on lines 1175..1175
          src/wafo/markov.py on lines 1176..1176
          src/wafo/markov.py on lines 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 15 locations. Consider refactoring.
          Open

              n, m = np.shape(fr)
          Severity: Major
          Found in src/wafo/markov.py and 14 other locations - About 50 mins to fix
          src/wafo/integrate.py on lines 699..700
          src/wafo/kdetools/kernels.py on lines 810..810
          src/wafo/kdetools/kernels.py on lines 887..887
          src/wafo/kdetools/kernels.py on lines 1010..1010
          src/wafo/kdetools/kernels.py on lines 1117..1117
          src/wafo/kdetools/kernels.py on lines 1237..1237
          src/wafo/misc.py on lines 2181..2182
          src/wafo/objects.py on lines 107..107
          src/wafo/objects.py on lines 1803..1803
          src/wafo/objects.py on lines 1896..1896
          src/wafo/objects.py on lines 2096..2096
          src/wafo/spectrum/core.py on lines 817..817
          src/wafo/stats/_continuous_distns.py on lines 7008..7008
          src/wafo/stats/estimation.py on lines 424..424

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

              Min_rfc = np.zeros((N, 1))
          Severity: Major
          Found in src/wafo/markov.py and 11 other locations - About 50 mins to fix
          src/wafo/_misc_numba.py on lines 610..610
          src/wafo/_misc_numba.py on lines 614..614
          src/wafo/markov.py on lines 344..344
          src/wafo/markov.py on lines 366..366
          src/wafo/markov.py on lines 612..612
          src/wafo/markov.py on lines 614..614
          src/wafo/misc.py on lines 2691..2691
          src/wafo/stats/core.py on lines 893..894
          src/wafo/stats/estimation.py on lines 1527..1527
          src/wafo/wavemodels.py on lines 102..102
          src/wafo/wavemodels.py on lines 203..203

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

                  tempp = np.zeros((dim_p, 1))
          Severity: Major
          Found in src/wafo/markov.py and 11 other locations - About 50 mins to fix
          src/wafo/_misc_numba.py on lines 610..610
          src/wafo/_misc_numba.py on lines 614..614
          src/wafo/markov.py on lines 366..366
          src/wafo/markov.py on lines 612..612
          src/wafo/markov.py on lines 613..613
          src/wafo/markov.py on lines 614..614
          src/wafo/misc.py on lines 2691..2691
          src/wafo/stats/core.py on lines 893..894
          src/wafo/stats/estimation.py on lines 1527..1527
          src/wafo/wavemodels.py on lines 102..102
          src/wafo/wavemodels.py on lines 203..203

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

                  tempm = np.zeros((dim_m, 1))
          Severity: Major
          Found in src/wafo/markov.py and 11 other locations - About 50 mins to fix
          src/wafo/_misc_numba.py on lines 610..610
          src/wafo/_misc_numba.py on lines 614..614
          src/wafo/markov.py on lines 344..344
          src/wafo/markov.py on lines 612..612
          src/wafo/markov.py on lines 613..613
          src/wafo/markov.py on lines 614..614
          src/wafo/misc.py on lines 2691..2691
          src/wafo/stats/core.py on lines 893..894
          src/wafo/stats/estimation.py on lines 1527..1527
          src/wafo/wavemodels.py on lines 102..102
          src/wafo/wavemodels.py on lines 203..203

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

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

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

              Max_rfc = np.zeros((N, 1))
          Severity: Major
          Found in src/wafo/markov.py and 11 other locations - About 50 mins to fix
          src/wafo/_misc_numba.py on lines 610..610
          src/wafo/_misc_numba.py on lines 614..614
          src/wafo/markov.py on lines 344..344
          src/wafo/markov.py on lines 366..366
          src/wafo/markov.py on lines 613..613
          src/wafo/markov.py on lines 614..614
          src/wafo/misc.py on lines 2691..2691
          src/wafo/stats/core.py on lines 893..894
          src/wafo/stats/estimation.py on lines 1527..1527
          src/wafo/wavemodels.py on lines 102..102
          src/wafo/wavemodels.py on lines 203..203

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

              nt = np.fliplr(np.triu(np.fliplr(m2), 0))
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 50 mins to fix
          src/wafo/markov.py on lines 708..708

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

              f_rfc = f_rfc + np.rot90(np.diag(dd), -1)
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 50 mins to fix
          src/wafo/markov.py on lines 64..64

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 14.

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

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

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

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

          Refactorings

          Further Reading

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

                      NT = min(mA[0] - sum(RAA[:, 0]), MA[0] - sum(RAA[0, :]))  # check!
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 50 mins to fix
          src/wafo/covariance/estimation.py on lines 125..125

          Duplicated Code

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

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

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

              Sm1 = np.linalg.pinv(S)
          Severity: Major
          Found in src/wafo/markov.py and 22 other locations - About 45 mins to fix
          src/wafo/containers.py on lines 367..367
          src/wafo/covariance/core.py on lines 704..704
          src/wafo/covariance/estimation.py on lines 129..130
          src/wafo/doc/tutorial_scripts/chapter5.py on lines 36..36
          src/wafo/doc/tutorial_scripts/chapter5.py on lines 46..46
          src/wafo/doc/tutorial_scripts/chapter5.py on lines 88..88
          src/wafo/doc/tutorial_scripts/chapter5.py on lines 243..243
          src/wafo/interpolate.py on lines 1297..1297
          src/wafo/interpolate.py on lines 1311..1311
          src/wafo/kdetools/kdetools.py on lines 451..451
          src/wafo/kdetools/kdetools.py on lines 493..493
          src/wafo/kdetools/kdetools.py on lines 722..722
          src/wafo/kdetools/kernels.py on lines 641..641
          src/wafo/kdetools/kernels.py on lines 801..801
          src/wafo/kdetools/kernels.py on lines 802..802
          src/wafo/kdetools/kernels.py on lines 886..886
          src/wafo/kdetools/kernels.py on lines 1001..1001
          src/wafo/kdetools/kernels.py on lines 1002..1002
          src/wafo/kdetools/kernels.py on lines 1105..1105
          src/wafo/kdetools/kernels.py on lines 1106..1106
          src/wafo/kdetools/kernels.py on lines 1232..1232
          src/wafo/kdetools/kernels.py on lines 1233..1233

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

              if kind in (-1, 0):
                  raise NotImplementedError('kind = {} not yet implemented'.format(kind))
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 45 mins to fix
          src/wafo/kdetools/kernels.py on lines 703..704
          src/wafo/kdetools/kernels.py on lines 706..707
          src/wafo/markov.py on lines 157..160
          src/wafo/misc.py on lines 1076..1093
          src/wafo/objects.py on lines 329..339
          src/wafo/objects.py on lines 775..776
          src/wafo/objects.py on lines 1072..1076
          src/wafo/stats/_distn_infrastructure.py on lines 282..283
          src/wafo/stats/_distn_infrastructure.py on lines 423..424

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                          tempm = _make_tempm(P, Ph, j, ntc, n)
          Severity: Major
          Found in src/wafo/markov.py and 5 other locations - About 45 mins to fix
          src/wafo/_misc_numba.py on lines 616..616
          src/wafo/gaussian.py on lines 382..382
          src/wafo/interpolate.py on lines 777..777
          src/wafo/stats/_distn_infrastructure.py on lines 95..95
          src/wafo/stats/core.py on lines 606..607

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                      if (j > ntc - 1) and (i == ntc - 1):
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 368..368
          src/wafo/markov.py on lines 423..423
          src/wafo/misc.py on lines 1204..1204
          src/wafo/misc.py on lines 2597..2597

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                                           [lam**2 - 1, lam**2 + 1]])
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 801..801
          src/wafo/spectrum/core.py on lines 219..219
          src/wafo/spectrum/core.py on lines 240..240
          src/wafo/stats/_continuous_distns.py on lines 1836..1836

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                      if (j == ntc - 1) and (i < ntc - 1):
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 368..368
          src/wafo/markov.py on lines 429..429
          src/wafo/misc.py on lines 1204..1204
          src/wafo/misc.py on lines 2597..2597

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                      if i < ntc - 1:
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/kdetools/kernels.py on lines 1178..1178
          src/wafo/markov.py on lines 417..417
          src/wafo/markov.py on lines 423..423
          src/wafo/spectrum/core.py on lines 3468..3468

          Duplicated Code

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

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

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

              S = 1 / 2 * s**2 * np.array([[lam**2 + 1, lam**2 - 1],
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 802..802
          src/wafo/spectrum/core.py on lines 219..219
          src/wafo/spectrum/core.py on lines 240..240
          src/wafo/stats/_continuous_distns.py on lines 1836..1836

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                  if j == n - 1:
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 423..423
          src/wafo/markov.py on lines 429..429
          src/wafo/misc.py on lines 1204..1204
          src/wafo/misc.py on lines 2597..2597

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                      if (j > ntc - 1) and (i < ntc - 1):
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 45 mins to fix
          src/wafo/kdetools/kernels.py on lines 1178..1178
          src/wafo/markov.py on lines 406..406
          src/wafo/markov.py on lines 423..423
          src/wafo/spectrum/core.py on lines 3468..3468

          Duplicated Code

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

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

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

              Ph = np.rot90(np.fliplr(f_mM * 1.0), -1)
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 45 mins to fix
          src/wafo/stats/_continuous_distns.py on lines 5909..5909
          src/wafo/stats/_continuous_distns.py on lines 5969..5969
          src/wafo/win32_utils.py on lines 253..253

          Duplicated Code

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

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

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

                      DRFC = SA - SMA - SRA + SMA_rfc
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 45 mins to fix
          src/wafo/gaussian.py on lines 336..336
          src/wafo/stats/core.py on lines 1034..1034
          src/wafo/stats/core.py on lines 1048..1048

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                  if ntc > n - 1:
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 411..411
          src/wafo/markov.py on lines 417..417
          src/wafo/markov.py on lines 429..429

          Duplicated Code

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

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

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

              fr_raw = (nt[:n - 1, :][:, n - 1] + nt[1:, :][:, 1:] -
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 213..213
          src/wafo/markov.py on lines 213..213
          src/wafo/stats/core.py on lines 1303..1303

          Duplicated Code

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

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

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

                      if j > ntc - 1:
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 45 mins to fix
          src/wafo/markov.py on lines 325..325
          src/wafo/markov.py on lines 417..417
          src/wafo/markov.py on lines 429..429

          Duplicated Code

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

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

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

              Splus = np.sum(f_xy, axis=1).T
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 45 mins to fix
          src/wafo/markov.py on lines 667..667

          Duplicated Code

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

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

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

                          NN = MA - np.sum(AA, axis=1).T
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 45 mins to fix
          src/wafo/markov.py on lines 610..610

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 13.

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

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

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

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

          Refactorings

          Further Reading

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

                          tempp = _make_tempp(P, Ph, i, ntc)
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 40 mins to fix
          src/wafo/integrate.py on lines 1319..1319
          src/wafo/kdetools/kernels.py on lines 926..926
          src/wafo/kdetools/kernels.py on lines 929..929
          src/wafo/misc.py on lines 2609..2609
          src/wafo/stats/_distn_infrastructure.py on lines 107..107
          src/wafo/stats/core.py on lines 440..440
          src/wafo/stats/core.py on lines 1370..1370
          src/wafo/stats/core.py on lines 1372..1372
          src/wafo/tests/test_padua.py on lines 80..80

          Duplicated Code

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

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

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

          Tuning

          This issue has a mass of 12.

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

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

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

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

          Refactorings

          Further Reading

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

                  fmM = np.maximum(0, fmM)
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 40 mins to fix
          src/wafo/kdetools/kernels.py on lines 825..825
          src/wafo/kdetools/kernels.py on lines 826..826
          src/wafo/stats/_continuous_distns.py on lines 4049..4049
          src/wafo/stats/_continuous_distns.py on lines 4937..4937

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 12.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

                  fr[1:, 1:] = fr_raw
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 40 mins to fix
          src/wafo/markov.py on lines 63..63
          src/wafo/markov.py on lines 278..278

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 12.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 3 locations. Consider refactoring.
          Open

                  nt[1:n, :n - 1] = flip(csum(flip(csum(cmat[:-1, 1:], axis=0)), axis=1))
          Severity: Major
          Found in src/wafo/markov.py and 2 other locations - About 40 mins to fix
          src/wafo/markov.py on lines 36..36
          src/wafo/markov.py on lines 63..63

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                      clevels = Fmax * np.r_[0.005,
                                             0.01,
                                             0.02,
                                             0.05,
                                             0.1,
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 40 mins to fix
          src/wafo/tests/test_misc.py on lines 208..210

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 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

          Identical blocks of code found in 4 locations. Consider refactoring.
          Open

                  Am = P[ntc - 1:j, ntc:j + 1]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 35 mins to fix
          src/wafo/markov.py on lines 364..364
          src/wafo/markov.py on lines 369..369
          src/wafo/markov.py on lines 371..371

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 4 locations. Consider refactoring.
          Open

                  Bm = Ph[ntc:j + 1, ntc - 1:j]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 35 mins to fix
          src/wafo/markov.py on lines 363..363
          src/wafo/markov.py on lines 369..369
          src/wafo/markov.py on lines 371..371

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 4 locations. Consider refactoring.
          Open

                      em = np.sum(P[ntc - 1:j, j + 1:n], axis=1)
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 35 mins to fix
          src/wafo/markov.py on lines 363..363
          src/wafo/markov.py on lines 364..364
          src/wafo/markov.py on lines 369..369

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Identical blocks of code found in 4 locations. Consider refactoring.
          Open

                      em = P[ntc - 1:j, n]
          Severity: Major
          Found in src/wafo/markov.py and 3 other locations - About 35 mins to fix
          src/wafo/markov.py on lines 363..363
          src/wafo/markov.py on lines 364..364
          src/wafo/markov.py on lines 371..371

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 8 locations. Consider refactoring.
          Open

                      for j in range(n - 1):
          Severity: Major
          Found in src/wafo/markov.py and 7 other locations - About 35 mins to fix
          src/wafo/kdetools/kernels.py on lines 418..418
          src/wafo/markov.py on lines 219..219
          src/wafo/markov.py on lines 1189..1189
          src/wafo/misc.py on lines 496..496
          src/wafo/transform/models.py on lines 492..492
          src/wafo/transform/models.py on lines 492..492
          src/wafo/transform/models.py on lines 499..499

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 8 locations. Consider refactoring.
          Open

                  for i in range(n - 1):
          Severity: Major
          Found in src/wafo/markov.py and 7 other locations - About 35 mins to fix
          src/wafo/kdetools/kernels.py on lines 418..418
          src/wafo/markov.py on lines 282..282
          src/wafo/markov.py on lines 1189..1189
          src/wafo/misc.py on lines 496..496
          src/wafo/transform/models.py on lines 492..492
          src/wafo/transform/models.py on lines 492..492
          src/wafo/transform/models.py on lines 499..499

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 8 locations. Consider refactoring.
          Open

              for k in range(n - 1):  # k = subdiagonal
          Severity: Major
          Found in src/wafo/markov.py and 7 other locations - About 35 mins to fix
          src/wafo/kdetools/kernels.py on lines 418..418
          src/wafo/markov.py on lines 219..219
          src/wafo/markov.py on lines 282..282
          src/wafo/misc.py on lines 496..496
          src/wafo/transform/models.py on lines 492..492
          src/wafo/transform/models.py on lines 492..492
          src/wafo/transform/models.py on lines 499..499

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 6 locations. Consider refactoring.
          Open

              udisc = u[::-1]  # np.fliplr(u)
          Severity: Major
          Found in src/wafo/markov.py and 5 other locations - About 35 mins to fix
          src/wafo/integrate.py on lines 992..992
          src/wafo/kdetools/kernels.py on lines 125..125
          src/wafo/misc.py on lines 1090..1091
          src/wafo/misc.py on lines 1501..1502
          src/wafo/tests/test_misc.py on lines 170..170

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 5 locations. Consider refactoring.
          Open

                  Bp = Ph[i + 1:ntc, i:ntc - 1]
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 35 mins to fix
          src/wafo/covariance/estimation.py on lines 163..163
          src/wafo/markov.py on lines 341..341
          src/wafo/markov.py on lines 408..408
          src/wafo/markov.py on lines 419..419

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                  Ap = P[i:ntc - 1, i + 1:ntc]
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 35 mins to fix
          src/wafo/covariance/estimation.py on lines 163..163
          src/wafo/markov.py on lines 342..342
          src/wafo/markov.py on lines 408..408
          src/wafo/markov.py on lines 419..419

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                          b = np.dot(np.dot(tempp.T, f_mM[i:ntc - 1, n - j - 2::-1]),
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 35 mins to fix
          src/wafo/covariance/estimation.py on lines 163..163
          src/wafo/markov.py on lines 341..341
          src/wafo/markov.py on lines 342..342
          src/wafo/markov.py on lines 419..419

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                                            f_mM[i:ntc - 1, n - ntc - 1:-1:n - j + 1]),
          Severity: Major
          Found in src/wafo/markov.py and 4 other locations - About 35 mins to fix
          src/wafo/covariance/estimation.py on lines 163..163
          src/wafo/markov.py on lines 341..341
          src/wafo/markov.py on lines 342..342
          src/wafo/markov.py on lines 408..408

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

          def _raw_iter(fun2rfc, frfc, fmM_0=None, k=1, epsilon=1e-5):
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 35 mins to fix
          src/wafo/spectrum/models.py on lines 2005..2005

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 11.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 10 locations. Consider refactoring.
          Open

                  if method in [5, 15]:
          Severity: Major
          Found in src/wafo/markov.py and 9 other locations - About 30 mins to fix
          src/wafo/containers.py on lines 602..602
          src/wafo/integrate.py on lines 967..967
          src/wafo/integrate.py on lines 993..993
          src/wafo/markov.py on lines 157..157
          src/wafo/misc.py on lines 567..567
          src/wafo/spectrum/core.py on lines 1765..1765
          src/wafo/spectrum/core.py on lines 1999..1999
          src/wafo/spectrum/core.py on lines 2150..2150
          src/wafo/tests/test_misc.py on lines 168..168

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

          Tuning

          This issue has a mass of 10.

          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

          Refactorings

          Further Reading

          Similar blocks of code found in 2 locations. Consider refactoring.
          Open

                      clevels = Fmax * np.r_[0.001, 0.005, 0.01, 0.05, 0.1, 0.5, 1.0]
          Severity: Minor
          Found in src/wafo/markov.py and 1 other location - About 30 mins to fix
          src/wafo/stats/_continuous_distns.py on lines 4720..4720

          Duplicated Code

          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 "_get_PMm" to match the regular expression ^[a-z_][a-z0-9_]{2,}$.
          Open

              def _get_PMm(AA1, MA, nA):
          Severity: Major
          Found in src/wafo/markov.py by sonar-python

          Shared coding conventions allow teams to collaborate efficiently. This rule checks that all function names match a provided regular expression.

          Noncompliant Code Example

          With the default provided regular expression: ^[a-z_][a-z0-9_]{2,30}$

          def MyFunction(a,b):
              ...
          

          Compliant Solution

          def my_function(a,b):
              ...
          

          There are no issues that match your filters.

          Category
          Status