wafo-project/pywafo

View on GitHub
src/wafo/kdetools/kernels.py

Summary

Maintainability
F
3 wks
Test Coverage

Rename field "kernel"
Open

        self.kernel = _MKERNEL_DICT[name[:4]]
Severity: Major
Found in src/wafo/kdetools/kernels.py by sonar-python

It's confusing to have a class member with the same name (case differences aside) as its enclosing class. This is particularly so when you consider the common practice of naming a class instance for the class itself.

Best practice dictates that any field or member with the same name as the enclosing class be renamed to be more descriptive of the particular aspect of the class it represents or holds.

Noncompliant Code Example

class Foo:
  foo = ''

  def getFoo(self):
    ...

foo = Foo()
foo.getFoo() # what does this return?

Compliant Solution

class Foo:
  name = ''

  def getName(self):
    ...

foo = Foo()
foo.getName()

Remove this commented out code.
Open

        # R= int(mkernel(x)^2),  mu2= int(x^2*mkernel(x))
Severity: Major
Found in src/wafo/kdetools/kernels.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

        # order = numout*2+2
Severity: Major
Found in src/wafo/kdetools/kernels.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

            # L = 7
Severity: Major
Found in src/wafo/kdetools/kernels.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

        # psi8 = _GAUSS_KERNEL.psi(8)
Severity: Major
Found in src/wafo/kdetools/kernels.py by sonar-python

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

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

See

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

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

_MKERNEL_DICT = dict(
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 3 hrs to fix
src/wafo/stats/estimation.py on lines 207..207

Duplicated Code

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

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

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

Tuning

This issue has a mass of 41.

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

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

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

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

Refactorings

Further Reading

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

            while ((abs(h_old - h1) > max(releps * h1, abseps)) and
                   (count < maxit)):
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 839..840

Duplicated Code

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

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

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

Tuning

This issue has a mass of 39.

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

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

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

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

Refactorings

Further Reading

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

            while ((abs(h_old - h1) > max(releps * h1, abseps)) and
                   (count < maxit)):
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 1027..1028

Duplicated Code

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

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

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

Tuning

This issue has a mass of 39.

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

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

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

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

Refactorings

Further Reading

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

                f = np.real(ifft(fft(c, 2 * inc) * fft(kw)))  # convolution.
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 1055..1055

Duplicated Code

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

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

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

Tuning

This issue has a mass of 36.

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

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

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

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

Refactorings

Further Reading

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

        z = np.real(ifft(fft(c, 2 * inc) * fft(kw)))     # convolution.
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 1034..1034

Duplicated Code

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

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

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

Tuning

This issue has a mass of 36.

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

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

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

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

Refactorings

Further Reading

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

        c = (2 ** p * np.prod(np.r_[1:p + 1]) * sphere_volume(1, r) /
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 335..335

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

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

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

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

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

Refactorings

Further Reading

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

        c = 2 ** p * np.prod(np.r_[1:p + 1]) * sphere_volume(d, r) / np.prod(
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 362..362

Duplicated Code

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

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

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

            pnp2 = np.polyadd(-np.r_[pnp1, 0], np.polyder(pnp1))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.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 33.

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

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

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

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

Refactorings

Further Reading

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

            pnp1 = np.polyadd(-np.r_[pn, 0], np.polyder(pn))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 420..420

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

            h1 = h1 * (ste_constant / ste_constant2) ** (1.0 / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 1122..1122
src/wafo/kdetools/kernels.py on lines 1182..1182

Duplicated Code

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

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

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

Tuning

This issue has a mass of 29.

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

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

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

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

Refactorings

Further Reading

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

        hvec = hvec * (ste_constant2 / ste_constant) ** (1. / 5.)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 852..852
src/wafo/kdetools/kernels.py on lines 1182..1182

Duplicated Code

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

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

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

Tuning

This issue has a mass of 29.

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

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

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

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

Refactorings

Further Reading

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

        hvec = hvec * (ste_constant / ste_constant2) ** (1 / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 2 hrs to fix
src/wafo/kdetools/kernels.py on lines 852..852
src/wafo/kdetools/kernels.py on lines 1122..1122

Duplicated Code

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

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

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

        kw = np.r_[kw0, 0, kw0[-1:0:-1]]  # Apply fftshift to kw.
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1033..1033

Duplicated Code

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

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

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

                kw = np.r_[kw4, 0, kw4[-1:0:-1]]  # Apply 'fftshift' to kw.
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1054..1054

Duplicated Code

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

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

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

        min_a, max_a = data.min(axis=1), data.max(axis=1)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/gridding.py on lines 347..347

Duplicated Code

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

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

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 24.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

_stats_triw = (1. / 9, 350. / 429, np.inf)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 36..36
src/wafo/kdetools/kernels.py on lines 39..39
src/wafo/kdetools/kernels.py on lines 40..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

_stats_rect = (1. / 3, 1. / 2, np.inf)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 36..36
src/wafo/kdetools/kernels.py on lines 38..38
src/wafo/kdetools/kernels.py on lines 40..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

_stats_tria = (1. / 6, 2. / 3, np.inf)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 36..36
src/wafo/kdetools/kernels.py on lines 38..38
src/wafo/kdetools/kernels.py on lines 39..39

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

_stats_epan = (1. / 5, 3. / 5, np.inf)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 38..38
src/wafo/kdetools/kernels.py on lines 39..39
src/wafo/kdetools/kernels.py on lines 40..40

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

            delta = (bx - ax) / (inc - 1)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/integrate.py on lines 1270..1270
src/wafo/objects.py on lines 1062..1062

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

                t_star = 0.28 * N ** (-2. / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/misc.py on lines 1996..1996
src/wafo/misc.py on lines 1997..1997

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

                h1 = (ste_constant2 / psi4Gamma) ** (1.0 / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1041..1041

Duplicated Code

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

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

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

                h1 = (ste_constant / psi4) ** (1. / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 849..849

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

    def eval_points(self, points):
        return self.kernel(np.atleast_2d(points))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 8 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 289..290
src/wafo/stats/_continuous_distns.py on lines 3258..3260
src/wafo/stats/_continuous_distns.py on lines 3311..3313
src/wafo/stats/_continuous_distns.py on lines 3408..3411
src/wafo/stats/_continuous_distns.py on lines 4866..4868
src/wafo/stats/_continuous_distns.py on lines 5174..5176
src/wafo/stats/_continuous_distns.py on lines 6609..6611
src/wafo/stats/_continuous_distns.py on lines 6622..6623

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

    def kernel(self, x):
        return self._kernel(np.atleast_2d(x))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 8 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1267..1268
src/wafo/stats/_continuous_distns.py on lines 3258..3260
src/wafo/stats/_continuous_distns.py on lines 3311..3313
src/wafo/stats/_continuous_distns.py on lines 3408..3411
src/wafo/stats/_continuous_distns.py on lines 4866..4868
src/wafo/stats/_continuous_distns.py on lines 5174..5176
src/wafo/stats/_continuous_distns.py on lines 6609..6611
src/wafo/stats/_continuous_distns.py on lines 6622..6623

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

        if h0 is None:
            h0 = sigmaA * amise_constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1005..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 21.

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

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

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

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

Refactorings

Further Reading

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

        if h0 is None:
            h0 = sigmaA * amise_constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 805..806

Duplicated Code

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

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

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

        psi12 = 3465. / (512 * sqrt(pi))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1128..1128

Duplicated Code

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

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

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

Tuning

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

        psi8 = 105 / (32 * sqrt(pi))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1129..1129

Duplicated Code

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

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

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

        pdf = (1 - np.abs(x)).clip(min=0.0)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/stats/core.py on lines 1250..1250

Duplicated Code

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

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

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

Tuning

This issue has a mass of 21.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 20.

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

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

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

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

Refactorings

Further Reading

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

                         "Optimum is probably higher than "
                         "hs={0:g} for dim={1:d}".format(h[dim] * s, dim))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1176..1177

Duplicated Code

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

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

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

Tuning

This issue has a mass of 20.

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

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

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

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

Refactorings

Further Reading

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

                         "Optimum is probably lower than "
                         "hs={0:g} for dim={1:d}".format(h[dim] * s, dim))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1179..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 20.

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

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

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

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

Refactorings

Further Reading

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

            out.append(np.polyval(pnp2, t) * phi0)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/stats/estimation.py on lines 409..409

Duplicated Code

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

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

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

Tuning

This issue has a mass of 20.

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

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

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

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

Refactorings

Further Reading

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

            xn = np.linspace(0, bx - ax, inc)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1019..1019
src/wafo/kdetools/kernels.py on lines 1140..1140
src/wafo/kdetools/kernels.py on lines 1248..1248

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

            xn = np.linspace(0, bx - ax, inc)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 821..821
src/wafo/kdetools/kernels.py on lines 1019..1019
src/wafo/kdetools/kernels.py on lines 1248..1248

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

            xn = np.linspace(0, bx - ax, inc)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 821..821
src/wafo/kdetools/kernels.py on lines 1140..1140
src/wafo/kdetools/kernels.py on lines 1248..1248

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

            xn = np.linspace(0, bx - ax, inc)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 821..821
src/wafo/kdetools/kernels.py on lines 1019..1019
src/wafo/kdetools/kernels.py on lines 1140..1140

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        return (8 * sqrt(pi) * R / (3 * mu2 ** 2 * n)) ** (1. / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/stats/_continuous_distns.py on lines 5759..5759
src/wafo/transform/models.py on lines 506..506
src/wafo/wavemodels.py on lines 212..212

Duplicated Code

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

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

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

                gamma_ = ((2 * k40 * mu2 * psi4 * h1 ** 5) /
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/stats/_continuous_distns.py on lines 860..860
src/wafo/stats/_continuous_distns.py on lines 868..868
src/wafo/stats/_continuous_distns.py on lines 867..867

Duplicated Code

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

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

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

        pdf = (1 - (x / r) ** 2).clip(min=0.0) ** self.p
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/sg_filter/_core.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 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

                sig1 = sqrt(2 * hvec[i] ** 2 + 2 * g ** 2)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/integrate.py on lines 765..765

Duplicated Code

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

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

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

    _assert(not np.any((p < 0) | (100 < p)), 'PL must satisfy 0 <= PL <= 100')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/wave_theory/dispersion_relation.py on lines 166..166

Duplicated Code

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

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

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

Tuning

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

                g = const * n ** (-23. / 45) * hvec[i] ** (-2)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/spectrum/models.py on lines 967..967

Duplicated Code

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

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

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

        g1 = self._get_g(k60, mu2, psi8, n, order=8)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            g3 = self._get_g(k40, mu2, psi6, n, order=6)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            g4 = self._get_g(k80, mu2, psi10, n, order=10)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            psi4 = self._estimate_psi(c, xn, g3, n, order=4)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

                psi4Gamma = self._estimate_psi(c, xn, gamma_, n, order=4)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

        g2 = self._get_g(k100, mu2, psi12, n, order=12)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            psi6 = self._estimate_psi(c, xn, g1, n, order=6)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            psi10 = self._estimate_psi(c, xn, g2, n, order=10)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            psi8 = self._estimate_psi(c, xn, g4, n, order=8)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            g2 = self._get_g(k60, mu2, psi8NS, n, order=8)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            g1 = self._get_g(k40, mu2, psi6NS, n, order=6)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            psi4 = self._estimate_psi(c, xn, g1, n, order=4)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 833..833
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

            psi6 = self._estimate_psi(c, xn, g2, n, order=6)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 829..829
src/wafo/kdetools/kernels.py on lines 830..830
src/wafo/kdetools/kernels.py on lines 832..832
src/wafo/kdetools/kernels.py on lines 847..847
src/wafo/kdetools/kernels.py on lines 1130..1130
src/wafo/kdetools/kernels.py on lines 1131..1131
src/wafo/kdetools/kernels.py on lines 1144..1144
src/wafo/kdetools/kernels.py on lines 1145..1145
src/wafo/kdetools/kernels.py on lines 1147..1147
src/wafo/kdetools/kernels.py on lines 1148..1148
src/wafo/kdetools/kernels.py on lines 1150..1150
src/wafo/kdetools/kernels.py on lines 1151..1151

Duplicated Code

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

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

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

        std_a = np.std(a, axis=1, ddof=1)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter3.py on lines 38..38
src/wafo/doc/tutorial_scripts/chapter5.py on lines 186..186
src/wafo/kdetools/tests/test_kdetools.py on lines 145..145
src/wafo/kdetools/tests/test_kdetools.py on lines 200..200
src/wafo/kdetools/tests/test_kdetools.py on lines 220..220
src/wafo/stats/estimation.py on lines 1477..1477

Duplicated Code

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

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

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

Tuning

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

        _assert(dxij.shape == pdf.shape,
                'Shape of pdf does not match the arguments')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/interpolate.py on lines 852..852

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            bx = bx1[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1014..1014
src/wafo/kdetools/kernels.py on lines 1015..1015
src/wafo/kdetools/kernels.py on lines 1016..1016
src/wafo/kdetools/kernels.py on lines 1025..1025
src/wafo/kdetools/kernels.py on lines 1135..1135
src/wafo/kdetools/kernels.py on lines 1137..1137

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            ax = ax1[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1014..1014
src/wafo/kdetools/kernels.py on lines 1016..1016
src/wafo/kdetools/kernels.py on lines 1025..1025
src/wafo/kdetools/kernels.py on lines 1135..1135
src/wafo/kdetools/kernels.py on lines 1136..1136
src/wafo/kdetools/kernels.py on lines 1137..1137

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        sigmaA = self.hns(A) / amise_constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 625..625
src/wafo/kdetools/kernels.py on lines 804..804
src/wafo/kdetools/kernels.py on lines 1108..1108
src/wafo/kdetools/kernels.py on lines 1235..1235
src/wafo/sg_filter/demos.py on lines 48..48
src/wafo/stats/_continuous_distns.py on lines 4458..4458

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        sigmaA = self.hns(A) / amise_constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 625..625
src/wafo/kdetools/kernels.py on lines 1004..1004
src/wafo/kdetools/kernels.py on lines 1108..1108
src/wafo/kdetools/kernels.py on lines 1235..1235
src/wafo/sg_filter/demos.py on lines 48..48
src/wafo/stats/_continuous_distns.py on lines 4458..4458

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            bx = bx1[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1014..1014
src/wafo/kdetools/kernels.py on lines 1015..1015
src/wafo/kdetools/kernels.py on lines 1025..1025
src/wafo/kdetools/kernels.py on lines 1135..1135
src/wafo/kdetools/kernels.py on lines 1136..1136
src/wafo/kdetools/kernels.py on lines 1137..1137

Duplicated Code

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

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

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

mkernel_epanechnikov = _KernelMulti(p=1, stats=_stats_epan, name='epanechnikov')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 347..347
src/wafo/kdetools/kernels.py on lines 348..348
src/wafo/kdetools/kernels.py on lines 372..372
src/wafo/kdetools/kernels.py on lines 373..373
src/wafo/kdetools/kernels.py on lines 374..374

Duplicated Code

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

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

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

mkernel_p1biweight = _KernelProduct(p=2, stats=_stats_biwe, name='p1biweight')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 346..346
src/wafo/kdetools/kernels.py on lines 347..347
src/wafo/kdetools/kernels.py on lines 348..348
src/wafo/kdetools/kernels.py on lines 372..372
src/wafo/kdetools/kernels.py on lines 374..374

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        sigmaA = self.hns(A) / amise_constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 625..625
src/wafo/kdetools/kernels.py on lines 804..804
src/wafo/kdetools/kernels.py on lines 1004..1004
src/wafo/kdetools/kernels.py on lines 1235..1235
src/wafo/sg_filter/demos.py on lines 48..48
src/wafo/stats/_continuous_distns.py on lines 4458..4458

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            ax = ax1[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1014..1014
src/wafo/kdetools/kernels.py on lines 1015..1015
src/wafo/kdetools/kernels.py on lines 1016..1016
src/wafo/kdetools/kernels.py on lines 1025..1025
src/wafo/kdetools/kernels.py on lines 1136..1136
src/wafo/kdetools/kernels.py on lines 1137..1137

Duplicated Code

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

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

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

mkernel_triweight = _KernelMulti(p=3, stats=_stats_triw, name='triweight')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 346..346
src/wafo/kdetools/kernels.py on lines 347..347
src/wafo/kdetools/kernels.py on lines 372..372
src/wafo/kdetools/kernels.py on lines 373..373
src/wafo/kdetools/kernels.py on lines 374..374

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            h1 = h[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1014..1014
src/wafo/kdetools/kernels.py on lines 1015..1015
src/wafo/kdetools/kernels.py on lines 1016..1016
src/wafo/kdetools/kernels.py on lines 1135..1135
src/wafo/kdetools/kernels.py on lines 1136..1136
src/wafo/kdetools/kernels.py on lines 1137..1137

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        sigmaA = self.hns(A) / amise_constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 625..625
src/wafo/kdetools/kernels.py on lines 804..804
src/wafo/kdetools/kernels.py on lines 1004..1004
src/wafo/kdetools/kernels.py on lines 1108..1108
src/wafo/sg_filter/demos.py on lines 48..48
src/wafo/stats/_continuous_distns.py on lines 4458..4458

Duplicated Code

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

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

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

mkernel_biweight = _KernelMulti(p=2, stats=_stats_biwe, name='biweight')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 346..346
src/wafo/kdetools/kernels.py on lines 348..348
src/wafo/kdetools/kernels.py on lines 372..372
src/wafo/kdetools/kernels.py on lines 373..373
src/wafo/kdetools/kernels.py on lines 374..374

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            datan = A[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1014..1014
src/wafo/kdetools/kernels.py on lines 1015..1015
src/wafo/kdetools/kernels.py on lines 1016..1016
src/wafo/kdetools/kernels.py on lines 1025..1025
src/wafo/kdetools/kernels.py on lines 1135..1135
src/wafo/kdetools/kernels.py on lines 1136..1136

Duplicated Code

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

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

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

Tuning

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

mkernel_p1epanechnikov = _KernelProduct(p=1, stats=_stats_epan, name='p1epanechnikov')
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 346..346
src/wafo/kdetools/kernels.py on lines 347..347
src/wafo/kdetools/kernels.py on lines 348..348
src/wafo/kdetools/kernels.py on lines 373..373
src/wafo/kdetools/kernels.py on lines 374..374

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            datan = A[dim] / s
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1015..1015
src/wafo/kdetools/kernels.py on lines 1016..1016
src/wafo/kdetools/kernels.py on lines 1025..1025
src/wafo/kdetools/kernels.py on lines 1135..1135
src/wafo/kdetools/kernels.py on lines 1136..1136
src/wafo/kdetools/kernels.py on lines 1137..1137

Duplicated Code

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

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

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

mkernel_p1triweight = _KernelProduct(p=3, stats=_stats_triw,
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 346..346
src/wafo/kdetools/kernels.py on lines 347..347
src/wafo/kdetools/kernels.py on lines 348..348
src/wafo/kdetools/kernels.py on lines 372..372
src/wafo/kdetools/kernels.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 17.

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

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

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

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

Refactorings

Further Reading

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

if __name__ == '__main__':
    test_docstrings(__file__)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kdetools.py on lines 1205..1206

Duplicated Code

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

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

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

        phi0 = exp(-0.5 * t ** 2) / sqrt(2 * pi)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1165..1165
src/wafo/spectrum/models.py on lines 1323..1323

Duplicated Code

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

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

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

                sig3 = sqrt(2 * g ** 2)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 415..415
src/wafo/spectrum/models.py on lines 1323..1323

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        return min_a - offset, max_a + offset
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/stats/estimation.py on lines 438..438
src/wafo/stats/estimation.py on lines 1178..1178

Duplicated Code

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

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

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

                               2 * _GAUSS_KERNEL(Y / sig2) / sig2 +
                               _GAUSS_KERNEL(Y / sig3) / sig3)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1166..1166

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        return self._hmns_scale(n, d) * np.real(sqrtm(np.cov(a)))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/spectrum/core.py on lines 1799..1799

Duplicated Code

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

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

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

                term2 = np.sum(_GAUSS_KERNEL(Y / sig1) / sig1 -
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 1167..1168

Duplicated Code

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

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

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

    fun = _MKERNEL_DICT[kernel[:4]]
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/misc.py on lines 1913..1913

Duplicated Code

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

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

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

    levels[levels < 0] = 0.0
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/spectrum/models.py on lines 1682..1682

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

            return t - (2 * N * sqrt(pi) * f) ** (-2. / 5)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_integrate_oscillating.py on lines 120..120

Duplicated Code

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

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

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

            c = gridcount(A[dim], xa)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/covariance/estimation.py on lines 167..167
src/wafo/kdetools/kernels.py on lines 823..823
src/wafo/misc.py on lines 1195..1195

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

            c = gridcount(A[dim], xa)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 1 hr to fix
src/wafo/covariance/estimation.py on lines 167..167
src/wafo/kdetools/kernels.py on lines 915..915
src/wafo/misc.py on lines 1195..1195

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

        mu2, R = _GAUSS_KERNEL.stats[:2]
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 296..296
src/wafo/kdetools/kernels.py on lines 301..301

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

        mu2, R = self.stats[:2]
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 296..296
src/wafo/kdetools/kernels.py on lines 812..812

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

        mu2, R = self.stats[:2]
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 301..301
src/wafo/kdetools/kernels.py on lines 812..812

Duplicated Code

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

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

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

    pdf, p = np.atleast_1d(pdf, p)
Severity: Major
Found in src/wafo/kdetools/kernels.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/markov.py on lines 489..493
src/wafo/misc.py on lines 494..494
src/wafo/misc.py on lines 1334..1334
src/wafo/misc.py on lines 2429..2429
src/wafo/padua.py on lines 326..326
src/wafo/padua.py on lines 475..475
src/wafo/padua.py on lines 513..513
src/wafo/sg_filter/demos.py on lines 418..418
src/wafo/spectrum/models.py on lines 2099..2099
src/wafo/spectrum/models.py on lines 2108..2108
src/wafo/stats/_continuous_distns.py on lines 3779..3779
src/wafo/stats/core.py on lines 495..495
src/wafo/stats/core.py on lines 534..534
src/wafo/stats/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 8 locations. Consider refactoring.
Open

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

    ind = np.argsort(pdf.ravel())  # sort by height of pdf
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 55 mins to fix
src/wafo/markov.py on lines 520..520
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

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

    def hste(self, data, h0=None, inc=128, maxit=100, releps=0.01, abseps=0.0):
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/kernels.py on lines 958..958

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

    def hstt(self, data, h0=None, inc=128, maxit=100, releps=0.01, abseps=0.0):
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/kernels.py on lines 764..764

Duplicated Code

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

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

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

            psi = _GAUSS_KERNEL.psi(r=2 * L + 4, sigma=s)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 55 mins to fix
src/wafo/kdetools/kernels.py on lines 1259..1259
src/wafo/kdetools/kernels.py on lines 1260..1260

Duplicated Code

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

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

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

Tuning

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

                    psi = self._estimate_psi(c, xn, gi, n, order=2 * ix + 2)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 55 mins to fix
src/wafo/kdetools/kernels.py on lines 1252..1252
src/wafo/kdetools/kernels.py on lines 1259..1259

Duplicated Code

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

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

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

Tuning

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

                    gi = self._get_g(Kd[ix - 1], mu2, psi, n, order=2 * ix + 4)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 55 mins to fix
src/wafo/kdetools/kernels.py on lines 1252..1252
src/wafo/kdetools/kernels.py on lines 1260..1260

Duplicated Code

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

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

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

Tuning

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

    @property
    def name(self):
        return self.kernel.name
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 55 mins to fix
src/wafo/kdetools/kdetools.py on lines 369..371
src/wafo/kdetools/kdetools.py on lines 377..379

Duplicated Code

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

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

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

Tuning

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

                psi4 = delta * z.sum()
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 55 mins to fix
src/wafo/spectrum/models.py on lines 1680..1680

Duplicated Code

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

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

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

            bandwidth = sqrt(t_star) * R
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 55 mins to fix
src/wafo/wavemodels.py on lines 216..216

Duplicated Code

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

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

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

        ax1, bx1 = self._get_grid_limits(A)
Severity: Major
Found in src/wafo/kdetools/kernels.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 1010..1010
src/wafo/kdetools/kernels.py on lines 1117..1117
src/wafo/kdetools/kernels.py on lines 1237..1237
src/wafo/markov.py on lines 55..55
src/wafo/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 15 locations. Consider refactoring.
Open

        ax1, bx1 = self._get_grid_limits(A)
Severity: Major
Found in src/wafo/kdetools/kernels.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 1237..1237
src/wafo/markov.py on lines 55..55
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 15 locations. Consider refactoring.
Open

        ax1, bx1 = self._get_grid_limits(A)
Severity: Major
Found in src/wafo/kdetools/kernels.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 1117..1117
src/wafo/kdetools/kernels.py on lines 1237..1237
src/wafo/markov.py on lines 55..55
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 15 locations. Consider refactoring.
Open

        ax1, bx1 = self._get_grid_limits(A)
Severity: Major
Found in src/wafo/kdetools/kernels.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 887..887
src/wafo/kdetools/kernels.py on lines 1010..1010
src/wafo/kdetools/kernels.py on lines 1117..1117
src/wafo/kdetools/kernels.py on lines 1237..1237
src/wafo/markov.py on lines 55..55
src/wafo/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 15 locations. Consider refactoring.
Open

        ax1, bx1 = self._get_grid_limits(A)
Severity: Major
Found in src/wafo/kdetools/kernels.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/markov.py on lines 55..55
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 5 locations. Consider refactoring.
Open

        _assert(0 < d, "D")
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 50 mins to fix
src/wafo/integrate.py on lines 471..471
src/wafo/kdetools/kdetools.py on lines 632..633
src/wafo/misc.py on lines 850..850
src/wafo/sg_filter/_core.py on lines 1125..1125

Duplicated Code

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

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

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

Tuning

This issue has a mass of 14.

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

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

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

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

Refactorings

Further Reading

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

            _assert_warn(count < maxit, 'The obtained value did not converge.')
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 50 mins to fix
src/wafo/kdetools/kernels.py on lines 854..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 14.

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

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

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

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

Refactorings

Further Reading

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

            _assert_warn(count < maxit, 'The obtained value did not converge.')
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 50 mins to fix
src/wafo/kdetools/kernels.py on lines 1043..1043

Duplicated Code

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

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

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

Tuning

This issue has a mass of 14.

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

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

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

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

Refactorings

Further Reading

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

mkernel_gaussian = _KernelGaussian(r=4.0, stats=_stats_gaus)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 50 mins to fix
src/wafo/kdetools/kernels.py on lines 447..447
src/wafo/kdetools/kernels.py on lines 457..457

Duplicated Code

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

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

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

Tuning

This issue has a mass of 14.

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

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

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

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

Refactorings

Further Reading

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

mkernel_laplace = _KernelLaplace(r=7.0, stats=_stats_lapl)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 50 mins to fix
src/wafo/kdetools/kernels.py on lines 433..433
src/wafo/kdetools/kernels.py on lines 457..457

Duplicated Code

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

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

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

Tuning

This issue has a mass of 14.

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

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

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

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

Refactorings

Further Reading

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

    pdf_dx = _init(pdf, xi, indexing=indexing)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 50 mins to fix
src/wafo/interpolate.py on lines 1243..1243
src/wafo/tests/test_misc.py on lines 694..694

Duplicated Code

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

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

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

Tuning

This issue has a mass of 14.

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

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

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

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

Refactorings

Further Reading

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

mkernel_logistic = _KernelLogistic(r=7.0, stats=_stats_logi)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 50 mins to fix
src/wafo/kdetools/kernels.py on lines 433..433
src/wafo/kdetools/kernels.py on lines 447..447

Duplicated Code

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

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

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

        sigma = np.where(iqr > 0, np.minimum(std_a, iqr / 1.349), std_a)
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 50 mins to fix
src/wafo/kdetools/kdetools.py on lines 366..366

Duplicated Code

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

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

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

        ste_constant = self.kernel.get_ste_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 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
src/wafo/markov.py on lines 803..803

Duplicated Code

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

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

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

        amise_constant = self.kernel.get_amise_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 1106..1106
src/wafo/kdetools/kernels.py on lines 1232..1232
src/wafo/kdetools/kernels.py on lines 1233..1233
src/wafo/markov.py on lines 803..803

Duplicated Code

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

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

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

        ste_constant = self.kernel.get_ste_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 1232..1232
src/wafo/kdetools/kernels.py on lines 1233..1233
src/wafo/markov.py on lines 803..803

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

        ste_constant = self.kernel.get_ste_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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/markov.py on lines 803..803

Duplicated Code

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

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

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

        ste_constant = self.kernel.get_ste_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 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
src/wafo/markov.py on lines 803..803

Duplicated Code

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

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

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

        amise_constant = self.kernel.get_amise_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 1233..1233
src/wafo/markov.py on lines 803..803

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

        amise_constant = self.kernel.get_amise_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 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
src/wafo/markov.py on lines 803..803

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 23 locations. Consider refactoring.
Open

        amise_constant = self.kernel.get_amise_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 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
src/wafo/markov.py on lines 803..803

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 23 locations. Consider refactoring.
Open

        ste_constant = self.kernel.get_ste_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 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
src/wafo/markov.py on lines 803..803

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 23 locations. Consider refactoring.
Open

        amise_constant = self.kernel.get_amise_constant(n)
Severity: Major
Found in src/wafo/kdetools/kernels.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 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
src/wafo/markov.py on lines 803..803

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 37 locations. Consider refactoring.
Open

            x = np.linspace(0, 0.1, 150)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 36 other locations - About 45 mins to fix
src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
src/wafo/interpolate.py on lines 1149..1149
src/wafo/interpolate.py on lines 1150..1150
src/wafo/interpolate.py on lines 1151..1151
src/wafo/interpolate.py on lines 1155..1155
src/wafo/interpolate.py on lines 1156..1156
src/wafo/interpolate.py on lines 1157..1157
src/wafo/interpolate.py on lines 1304..1304
src/wafo/kdetools/demo.py on lines 31..31
src/wafo/kdetools/demo.py on lines 68..68
src/wafo/objects.py on lines 415..415
src/wafo/sg_filter/demos.py on lines 20..20
src/wafo/sg_filter/demos.py on lines 381..381
src/wafo/sg_filter/demos.py on lines 417..417
src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
src/wafo/spectrum/core.py on lines 4401..4401
src/wafo/spectrum/models.py on lines 2087..2087
src/wafo/spectrum/models.py on lines 2092..2092
src/wafo/spectrum/models.py on lines 2140..2140
src/wafo/spectrum/models.py on lines 2150..2150
src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
src/wafo/stats/core.py on lines 1427..1427
src/wafo/stats/core.py on lines 1446..1446
src/wafo/tests/test_gaussian.py on lines 153..153
src/wafo/tests/test_misc.py on lines 112..112
src/wafo/tests/test_misc.py on lines 389..389
src/wafo/tests/test_misc.py on lines 452..452
src/wafo/tests/test_misc.py on lines 510..510
src/wafo/tests/test_misc.py on lines 520..520
src/wafo/tests/test_misc.py on lines 530..530
src/wafo/tests/test_misc.py on lines 535..535
src/wafo/tests/test_misc.py on lines 545..545
src/wafo/tests/test_misc.py on lines 555..555
src/wafo/tests/test_misc.py on lines 568..568

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

        if short_name not in scale_dict:
            raise NotImplementedError('Hmns bandwidth not implemented for '
Severity: Major
Found in src/wafo/kdetools/kernels.py and 9 other locations - About 45 mins to fix
src/wafo/kdetools/kernels.py on lines 706..707
src/wafo/markov.py on lines 157..158
src/wafo/markov.py on lines 157..160
src/wafo/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 10 locations. Consider refactoring.
Open

        sigma = self.r / 4.0
Severity: Major
Found in src/wafo/kdetools/kernels.py and 9 other locations - About 45 mins to fix
src/wafo/doc/tutorial_scripts/chapter1.py on lines 81..81
src/wafo/kdetools/kernels.py on lines 404..404
src/wafo/misc.py on lines 369..369
src/wafo/spectrum/models.py on lines 2125..2125
src/wafo/stats/_continuous_distns.py on lines 4556..4556
src/wafo/stats/_continuous_distns.py on lines 4612..4612
src/wafo/tests/test_integrate_oscillating.py on lines 190..190
src/wafo/tests/test_integrate_oscillating.py on lines 272..272
src/wafo/tests/test_integrate_oscillating.py on lines 342..342

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

        sigma = self.r / 4.0
Severity: Major
Found in src/wafo/kdetools/kernels.py and 9 other locations - About 45 mins to fix
src/wafo/doc/tutorial_scripts/chapter1.py on lines 81..81
src/wafo/kdetools/kernels.py on lines 409..409
src/wafo/misc.py on lines 369..369
src/wafo/spectrum/models.py on lines 2125..2125
src/wafo/stats/_continuous_distns.py on lines 4556..4556
src/wafo/stats/_continuous_distns.py on lines 4612..4612
src/wafo/tests/test_integrate_oscillating.py on lines 190..190
src/wafo/tests/test_integrate_oscillating.py on lines 272..272
src/wafo/tests/test_integrate_oscillating.py on lines 342..342

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

        if d > 2 and short_name in ['biwe', 'triw']:
            raise NotImplementedError('Not implemented for d>2 and '
Severity: Major
Found in src/wafo/kdetools/kernels.py and 9 other locations - About 45 mins to fix
src/wafo/kdetools/kernels.py on lines 703..704
src/wafo/markov.py on lines 157..158
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 7 locations. Consider refactoring.
Open

        iqr = iqrange(a, axis=1)  # interquartile range
Severity: Major
Found in src/wafo/kdetools/kernels.py and 6 other locations - About 45 mins to fix
src/wafo/interpolate.py on lines 660..660
src/wafo/kdetools/kdetools.py on lines 920..920
src/wafo/kdetools/kdetools.py on lines 925..925
src/wafo/kdetools/kdetools.py on lines 926..926
src/wafo/stats/core.py on lines 1382..1382
src/wafo/tests/test_misc.py on lines 310..310

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 6 locations. Consider refactoring.
Open

_stats_logi = (pi ** 2 / 3, 1. / 6, 1 / 42)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 45 mins to fix
src/wafo/spectrum/models.py on lines 1669..1669
src/wafo/stats/_continuous_distns.py on lines 3858..3858
src/wafo/stats/_continuous_distns.py on lines 8140..8140
src/wafo/stats/_continuous_distns.py on lines 8196..8196
src/wafo/stats/_continuous_distns.py on lines 8363..8363

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

        scale_dict = dict(epan=(8.0 * (d + 4.0) * (2 * sqrt(pi)) ** d /
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 45 mins to fix
src/wafo/integrate.py on lines 329..329
src/wafo/padua.py on lines 408..408
src/wafo/stats/_continuous_distns.py on lines 3855..3855
src/wafo/stats/_continuous_distns.py on lines 6170..6170
src/wafo/transform/models.py on lines 176..176

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 5 locations. Consider refactoring.
Open

        return np.prod(s / (s + 1) ** 2, axis=0)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 45 mins to fix
src/wafo/demos.py on lines 118..118
src/wafo/demos.py on lines 116..116
src/wafo/stats/_continuous_distns.py on lines 6431..6431
src/wafo/transform/models.py on lines 199..199

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            np.r_[(d + 2):(2 * p + d + 1):2])  # normalizing constant
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 45 mins to fix
src/wafo/objects.py on lines 426..426
src/wafo/spectrum/core.py on lines 192..194
src/wafo/spectrum/core.py on lines 203..205
src/wafo/stats/_continuous_distns.py on lines 1961..1961

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 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

            _assert_warn(idx < maxit - 1,
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 45 mins to fix
src/wafo/markov.py on lines 406..406
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 4 locations. Consider refactoring.
Open

        return scale_dict[short_name] * n ** (-1. / (d + 4))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 45 mins to fix
src/wafo/kdetools/kernels.py on lines 702..702
src/wafo/kdetools/kernels.py on lines 702..702
src/wafo/kdetools/kernels.py on lines 762..762

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        return (-2. * k_order_2 / (mu2 * psi_order * n)) ** (1. / (order + 1))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 45 mins to fix
src/wafo/kdetools/kernels.py on lines 702..702
src/wafo/kdetools/kernels.py on lines 702..702
src/wafo/kdetools/kernels.py on lines 709..709

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                          gaus=(4.0 / (d + 2.0)) ** (1. / (d + 4.0)))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 45 mins to fix
src/wafo/kdetools/kernels.py on lines 702..702
src/wafo/kdetools/kernels.py on lines 709..709
src/wafo/kdetools/kernels.py on lines 762..762

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

    return (r ** d) * 2.0 * pi ** (d / 2.0) / (d * gamma(d / 2.0))
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 45 mins to fix
src/wafo/stats/_continuous_distns.py on lines 5894..5894
src/wafo/stats/_continuous_distns.py on lines 5894..5894

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        return (2 * r) ** d
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 45 mins to fix
src/wafo/spectrum/core.py on lines 3783..3783

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    return fun(np.atleast_2d(X))
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 45 mins to fix
src/wafo/stats/_continuous_distns.py on lines 5181..5182

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            for s in range(L - 1, 1, -1):
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 45 mins to fix
src/wafo/objects.py on lines 2575..2575

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                const = (1 + (1. / 2) ** (s + 1. / 2)) / 3
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 45 mins to fix
src/wafo/spectrum/models.py on lines 1612..1612

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 13.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    cdf = cdf / cdf[-1] * n / (n + 1.5e-8)
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 45 mins to fix
src/wafo/covariance/estimation.py on lines 154..154

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

            f0 = fixed_point(ai, N, I, a2)
Severity: Major
Found in src/wafo/kdetools/kernels.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 929..929
src/wafo/markov.py on lines 407..407
src/wafo/misc.py on lines 2609..2609
src/wafo/stats/_distn_infrastructure.py on lines 107..107
src/wafo/stats/core.py on lines 440..440
src/wafo/stats/core.py on lines 1370..1370
src/wafo/stats/core.py on lines 1372..1372
src/wafo/tests/test_padua.py on lines 80..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 12.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

                f1 = fixed_point(bi, N, I, a2)
Severity: Major
Found in src/wafo/kdetools/kernels.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/markov.py on lines 407..407
src/wafo/misc.py on lines 2609..2609
src/wafo/stats/_distn_infrastructure.py on lines 107..107
src/wafo/stats/core.py on lines 440..440
src/wafo/stats/core.py on lines 1370..1370
src/wafo/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

            psi8NS = _GAUSS_KERNEL.psi(8, s)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/kernels.py on lines 825..825
src/wafo/markov.py on lines 112..112
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 5 locations. Consider refactoring.
Open

        self.get_smoothing = getattr(self, fun)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/kdetools.py on lines 952..952
src/wafo/kdetools/kdetools.py on lines 953..953
src/wafo/kdetools/kdetools.py on lines 1199..1199
src/wafo/spectrum/models.py on lines 543..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 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

            psi6NS = _GAUSS_KERNEL.psi(6, s)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/kernels.py on lines 826..826
src/wafo/markov.py on lines 112..112
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

    def norm_factor(self, d=1, n=None):
        return self.kernel.norm_factor(d, n)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 40 mins to fix
src/wafo/stats/estimation.py on lines 1255..1256
src/wafo/stats/estimation.py on lines 1283..1283

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 12.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    return np.abs(np.percentile(data, 75, axis=axis) -
                  np.percentile(data, 25, axis=axis))
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 40 mins to fix
src/wafo/kdetools/kernels.py on lines 231..231

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 12.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 13 locations. Consider refactoring.
Open

            H = amise_constant / 0.93
Severity: Major
Found in src/wafo/kdetools/kernels.py and 12 other locations - About 35 mins to fix
src/wafo/integrate.py on lines 1213..1213
src/wafo/integrate_oscillating.py on lines 304..304
src/wafo/kdetools/demo.py on lines 32..32
src/wafo/sg_filter/demos.py on lines 313..313
src/wafo/sg_filter/demos.py on lines 316..316
src/wafo/stats/_continuous_distns.py on lines 4978..4978
src/wafo/stats/_continuous_distns.py on lines 6859..6859
src/wafo/stats/core.py on lines 231..231
src/wafo/stats/estimation.py on lines 318..318
src/wafo/transform/models.py on lines 206..206
src/wafo/transform/models.py on lines 207..207
src/wafo/transform/models.py on lines 324..324

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 11 locations. Consider refactoring.
Open

        x2 = x ** 2
Severity: Major
Found in src/wafo/kdetools/kernels.py and 10 other locations - About 35 mins to fix
src/wafo/integrate.py on lines 480..480
src/wafo/misc.py on lines 1984..1984
src/wafo/sg_filter/demos.py on lines 163..163
src/wafo/spectrum/core.py on lines 1995..1995
src/wafo/spectrum/core.py on lines 2071..2071
src/wafo/spectrum/core.py on lines 2147..2147
src/wafo/spectrum/models.py on lines 1672..1672
src/wafo/stats/_continuous_distns.py on lines 8372..8372
src/wafo/stats/estimation.py on lines 1211..1212
src/wafo/stats/estimation.py on lines 1219..1219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 8 locations. Consider refactoring.
Open

        for _i in range(numout - 1):
Severity: Major
Found in src/wafo/kdetools/kernels.py and 7 other locations - About 35 mins to fix
src/wafo/markov.py on lines 219..219
src/wafo/markov.py on lines 282..282
src/wafo/markov.py on lines 1189..1189
src/wafo/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

    ind = ind[::-1]
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 35 mins to fix
src/wafo/integrate.py on lines 992..992
src/wafo/markov.py on lines 387..387
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 6 locations. Consider refactoring.
Open

__all__ = ['Kernel', 'sphere_volume', 'qlevels', 'iqrange', 'percentile']
Severity: Major
Found in src/wafo/kdetools/kernels.py and 5 other locations - About 35 mins to fix
src/wafo/conftest.py on lines 0..3
src/wafo/kdetools/kdetools.py on lines 28..28
src/wafo/objects.py on lines 48..49
src/wafo/stats/distributions.py on lines 256..256
src/wafo/wave_theory/core.py on lines 10..10

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

mkernel_triangular = _KernelTriangular(stats=_stats_tria)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 35 mins to fix
src/wafo/kdetools/kdetools.py on lines 188..188
src/wafo/kdetools/kernels.py on lines 388..388
src/wafo/stats/tests/test_fit.py on lines 65..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

        pn = [1, 0, -6, 0, 3]
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 35 mins to fix
src/wafo/stats/_continuous_distns.py on lines 4760..4760
src/wafo/tests/test_misc.py on lines 119..120
src/wafo/tests/test_misc.py on lines 121..121

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

mkernel_rectangular = _KernelRectangular(stats=_stats_rect)
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 35 mins to fix
src/wafo/kdetools/kdetools.py on lines 188..188
src/wafo/kdetools/kernels.py on lines 398..398
src/wafo/stats/tests/test_fit.py on lines 65..65

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        return pdf.prod(axis=0)
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 35 mins to fix
src/wafo/kdetools/kernels.py on lines 395..395
src/wafo/spectrum/models.py on lines 1841..1841

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        return pdf.prod(axis=0)
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 2 other locations - About 35 mins to fix
src/wafo/kdetools/kernels.py on lines 369..369
src/wafo/spectrum/models.py on lines 1841..1841

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

    _assert(not any(pdf.ravel() < 0),
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 35 mins to fix
src/wafo/transform/tests/test_trdata.py on lines 29..29

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 11.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 25 locations. Consider refactoring.
Open

        d, n = a.shape
Severity: Major
Found in src/wafo/kdetools/kernels.py and 24 other locations - About 30 mins to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
src/wafo/gaussian.py on lines 335..335
src/wafo/gaussian.py on lines 717..717
src/wafo/graphutil.py on lines 238..238
src/wafo/kdetools/gridding.py on lines 230..230
src/wafo/kdetools/gridding.py on lines 341..341
src/wafo/kdetools/kdetools.py on lines 226..226
src/wafo/kdetools/kdetools.py on lines 709..709
src/wafo/kdetools/kdetools.py on lines 759..759
src/wafo/kdetools/kdetools.py on lines 773..773
src/wafo/kdetools/kdetools.py on lines 805..805
src/wafo/kdetools/kernels.py on lines 799..799
src/wafo/kdetools/kernels.py on lines 885..885
src/wafo/kdetools/kernels.py on lines 999..999
src/wafo/kdetools/kernels.py on lines 1103..1103
src/wafo/kdetools/kernels.py on lines 1230..1230
src/wafo/misc.py on lines 1188..1188
src/wafo/misc.py on lines 2885..2885
src/wafo/spectrum/core.py on lines 4114..4114
src/wafo/stats/core.py on lines 951..951
src/wafo/stats/core.py on lines 952..952
src/wafo/stats/core.py on lines 953..953
src/wafo/stats/core.py on lines 1253..1253
src/wafo/stats/core.py on lines 1353..1353

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 25 locations. Consider refactoring.
Open

        d, n = A.shape
Severity: Major
Found in src/wafo/kdetools/kernels.py and 24 other locations - About 30 mins to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
src/wafo/gaussian.py on lines 335..335
src/wafo/gaussian.py on lines 717..717
src/wafo/graphutil.py on lines 238..238
src/wafo/kdetools/gridding.py on lines 230..230
src/wafo/kdetools/gridding.py on lines 341..341
src/wafo/kdetools/kdetools.py on lines 226..226
src/wafo/kdetools/kdetools.py on lines 709..709
src/wafo/kdetools/kdetools.py on lines 759..759
src/wafo/kdetools/kdetools.py on lines 773..773
src/wafo/kdetools/kdetools.py on lines 805..805
src/wafo/kdetools/kernels.py on lines 755..755
src/wafo/kdetools/kernels.py on lines 799..799
src/wafo/kdetools/kernels.py on lines 885..885
src/wafo/kdetools/kernels.py on lines 1103..1103
src/wafo/kdetools/kernels.py on lines 1230..1230
src/wafo/misc.py on lines 1188..1188
src/wafo/misc.py on lines 2885..2885
src/wafo/spectrum/core.py on lines 4114..4114
src/wafo/stats/core.py on lines 951..951
src/wafo/stats/core.py on lines 952..952
src/wafo/stats/core.py on lines 953..953
src/wafo/stats/core.py on lines 1253..1253
src/wafo/stats/core.py on lines 1353..1353

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 25 locations. Consider refactoring.
Open

        d, n = A.shape
Severity: Major
Found in src/wafo/kdetools/kernels.py and 24 other locations - About 30 mins to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
src/wafo/gaussian.py on lines 335..335
src/wafo/gaussian.py on lines 717..717
src/wafo/graphutil.py on lines 238..238
src/wafo/kdetools/gridding.py on lines 230..230
src/wafo/kdetools/gridding.py on lines 341..341
src/wafo/kdetools/kdetools.py on lines 226..226
src/wafo/kdetools/kdetools.py on lines 709..709
src/wafo/kdetools/kdetools.py on lines 759..759
src/wafo/kdetools/kdetools.py on lines 773..773
src/wafo/kdetools/kdetools.py on lines 805..805
src/wafo/kdetools/kernels.py on lines 755..755
src/wafo/kdetools/kernels.py on lines 885..885
src/wafo/kdetools/kernels.py on lines 999..999
src/wafo/kdetools/kernels.py on lines 1103..1103
src/wafo/kdetools/kernels.py on lines 1230..1230
src/wafo/misc.py on lines 1188..1188
src/wafo/misc.py on lines 2885..2885
src/wafo/spectrum/core.py on lines 4114..4114
src/wafo/stats/core.py on lines 951..951
src/wafo/stats/core.py on lines 952..952
src/wafo/stats/core.py on lines 953..953
src/wafo/stats/core.py on lines 1253..1253
src/wafo/stats/core.py on lines 1353..1353

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 25 locations. Consider refactoring.
Open

        d, n = A.shape
Severity: Major
Found in src/wafo/kdetools/kernels.py and 24 other locations - About 30 mins to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
src/wafo/gaussian.py on lines 335..335
src/wafo/gaussian.py on lines 717..717
src/wafo/graphutil.py on lines 238..238
src/wafo/kdetools/gridding.py on lines 230..230
src/wafo/kdetools/gridding.py on lines 341..341
src/wafo/kdetools/kdetools.py on lines 226..226
src/wafo/kdetools/kdetools.py on lines 709..709
src/wafo/kdetools/kdetools.py on lines 759..759
src/wafo/kdetools/kdetools.py on lines 773..773
src/wafo/kdetools/kdetools.py on lines 805..805
src/wafo/kdetools/kernels.py on lines 755..755
src/wafo/kdetools/kernels.py on lines 799..799
src/wafo/kdetools/kernels.py on lines 999..999
src/wafo/kdetools/kernels.py on lines 1103..1103
src/wafo/kdetools/kernels.py on lines 1230..1230
src/wafo/misc.py on lines 1188..1188
src/wafo/misc.py on lines 2885..2885
src/wafo/spectrum/core.py on lines 4114..4114
src/wafo/stats/core.py on lines 951..951
src/wafo/stats/core.py on lines 952..952
src/wafo/stats/core.py on lines 953..953
src/wafo/stats/core.py on lines 1253..1253
src/wafo/stats/core.py on lines 1353..1353

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 25 locations. Consider refactoring.
Open

        d, n = A.shape
Severity: Major
Found in src/wafo/kdetools/kernels.py and 24 other locations - About 30 mins to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
src/wafo/gaussian.py on lines 335..335
src/wafo/gaussian.py on lines 717..717
src/wafo/graphutil.py on lines 238..238
src/wafo/kdetools/gridding.py on lines 230..230
src/wafo/kdetools/gridding.py on lines 341..341
src/wafo/kdetools/kdetools.py on lines 226..226
src/wafo/kdetools/kdetools.py on lines 709..709
src/wafo/kdetools/kdetools.py on lines 759..759
src/wafo/kdetools/kdetools.py on lines 773..773
src/wafo/kdetools/kdetools.py on lines 805..805
src/wafo/kdetools/kernels.py on lines 755..755
src/wafo/kdetools/kernels.py on lines 799..799
src/wafo/kdetools/kernels.py on lines 885..885
src/wafo/kdetools/kernels.py on lines 999..999
src/wafo/kdetools/kernels.py on lines 1230..1230
src/wafo/misc.py on lines 1188..1188
src/wafo/misc.py on lines 2885..2885
src/wafo/spectrum/core.py on lines 4114..4114
src/wafo/stats/core.py on lines 951..951
src/wafo/stats/core.py on lines 952..952
src/wafo/stats/core.py on lines 953..953
src/wafo/stats/core.py on lines 1253..1253
src/wafo/stats/core.py on lines 1353..1353

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 25 locations. Consider refactoring.
Open

        d, n = A.shape
Severity: Major
Found in src/wafo/kdetools/kernels.py and 24 other locations - About 30 mins to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 187..187
src/wafo/gaussian.py on lines 335..335
src/wafo/gaussian.py on lines 717..717
src/wafo/graphutil.py on lines 238..238
src/wafo/kdetools/gridding.py on lines 230..230
src/wafo/kdetools/gridding.py on lines 341..341
src/wafo/kdetools/kdetools.py on lines 226..226
src/wafo/kdetools/kdetools.py on lines 709..709
src/wafo/kdetools/kdetools.py on lines 759..759
src/wafo/kdetools/kdetools.py on lines 773..773
src/wafo/kdetools/kdetools.py on lines 805..805
src/wafo/kdetools/kernels.py on lines 755..755
src/wafo/kdetools/kernels.py on lines 799..799
src/wafo/kdetools/kernels.py on lines 885..885
src/wafo/kdetools/kernels.py on lines 999..999
src/wafo/kdetools/kernels.py on lines 1103..1103
src/wafo/misc.py on lines 1188..1188
src/wafo/misc.py on lines 2885..2885
src/wafo/spectrum/core.py on lines 4114..4114
src/wafo/stats/core.py on lines 951..951
src/wafo/stats/core.py on lines 952..952
src/wafo/stats/core.py on lines 953..953
src/wafo/stats/core.py on lines 1253..1253
src/wafo/stats/core.py on lines 1353..1353

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

    def __init__(self, r=1.0, stats=None, name=''):
Severity: Major
Found in src/wafo/kdetools/kernels.py and 3 other locations - About 30 mins to fix
src/wafo/misc.py on lines 1001..1001
src/wafo/misc.py on lines 1397..1397
src/wafo/spectrum/core.py on lines 4017..4017

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            hvec = np.linspace(0.25 * H, H, maxit)
Severity: Minor
Found in src/wafo/kdetools/kernels.py and 1 other location - About 30 mins to fix
src/wafo/spectrum/models.py on lines 1990..1990

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 10.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

There are no issues that match your filters.

Category
Status