wafo-project/pywafo

View on GitHub
src/wafo/tests/test_misc.py

Summary

Maintainability
F
1 mo
Test Coverage

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert d.test1 == 1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert common_shape(A, B, C) == (4, 5)
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert d.keys() == ['test1', 'test2']
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert common_shape(A, B, C, shape=(3, 4, 1)) == (3, 4, 5)
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert 1 == d.test1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

            assert ind1[-1] == 146
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert d.test2 == 3

Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert 3 == d.test2
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert d.test1 == 5
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert y == 1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert vals == 1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert opt['arg2'] == 3
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert y.ndim == 0
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert c_shape == truec_shape
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert common_shape(A, B, C) == (4, 5)
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert 'arg3' not in opt
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert nextpow2(np.arange(5)) == 3
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert c_shape1 is truec_shape1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert c_shape1 == truec_shape1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert c_shape1 == truec_shape1
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert B2.shape == (15,)
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert opt['arg1'] == 5
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert nextpow2(10) == 4
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert vals == 2.5
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

            assert sub[j] == true_sub_j
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert y.ndim == 0
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert B1.shape == (20,)
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert val == trueval

Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert y == 0

Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert common_shape(A, B, C, shape=(3, 4, 1)) == (3, 4, 5)
Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert i == 23

Severity: Info
Found in src/wafo/tests/test_misc.py by bandit

Remove this commented out code.
Open

    # print(y0[::40].tolist())
Severity: Major
Found in src/wafo/tests/test_misc.py by sonar-python

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

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

See

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

Remove this commented out code.
Open

    # assert(False)
Severity: Major
Found in src/wafo/tests/test_misc.py by sonar-python

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

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

See

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

Remove this commented out code.
Open

    # depth = 10
Severity: Major
Found in src/wafo/tests/test_misc.py by sonar-python

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

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

See

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

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

    assert_allclose(ind,
                    [1, 3, 4, 6, 7, 9, 11, 13, 14, 16, 18, 19, 21,
                     23, 25, 26, 28, 29, 31, 33, 35, 36, 38, 39, 41, 43,
                     45, 46, 48, 50, 51, 53, 55, 56, 58, 60, 61, 63, 65,
                     67, 68, 70, 71, 73, 75, 77, 78, 80, 81, 83, 85, 87,
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 day to fix
src/wafo/tests/test_misc.py on lines 193..204

Duplicated Code

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

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

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

Tuning

This issue has a mass of 157.

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

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

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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_allclose(ind, [1, 3, 4, 6, 7, 9, 11, 13, 14, 16, 18, 19, 21,
                          23, 25, 26, 28, 29, 31, 33, 35, 36, 38, 39, 41, 43,
                          45, 46, 48, 50, 51, 53, 55, 56, 58, 60, 61, 63, 65,
                          67, 68, 70, 71, 73, 75, 77, 78, 80, 81, 83, 85, 87,
                          88, 90, 92, 93, 95, 97, 99, 100, 102, 103, 105, 107, 109,
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 day to fix
src/wafo/tests/test_misc.py on lines 152..164

Duplicated Code

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

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

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

Tuning

This issue has a mass of 157.

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

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

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

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

    d_inf = [[0., -144.3090093, -269.37681737, -375.20342419, -461.78882978,
              -529.13303412, -577.23603722, -606.09783908, -615.7184397,
              -606.09783908, -577.23603722, -529.13303412, -461.78882978,
              -375.20342419, -269.37681737, -144.3090093, 0., 0., 0., 0.,
              0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 5 hrs to fix
src/wafo/tests/test_misc.py on lines 48..60

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

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

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

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

    d_10 = [[-3.43299449, -144.58425201, -269.97386241, -376.2314858,
             -463.35503499, -531.34450329, -580.19988853, -609.92118976,
             -620.50840653, -611.96153858, -584.28058577, -537.46554798,
             -471.51642516, -386.43321726, -282.21592426, -158.8601612, 0., 0.,
             0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 5 hrs to fix
src/wafo/tests/test_misc.py on lines 33..45

Duplicated Code

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

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

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

Tuning

This issue has a mass of 74.

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

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

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

See codeclimate-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 test_h0_p0_r0(self):
        vals = rotation_matrix(heading=0, pitch=0, roll=0)
        truevals = [[1., 0., 0.],
                    [0., 1., 0.],
                    [0., 0., 1.]]
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 4 hrs to fix
src/wafo/tests/test_misc.py on lines 590..595
src/wafo/tests/test_misc.py on lines 597..602
src/wafo/tests/test_misc.py on lines 604..609

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

    def test_h0_p180_r0(self):
        vals = rotation_matrix(heading=0, pitch=180, roll=0)
        truevals = [[-1.0, 0.0, 1.2246467991473532e-16],
                    [-0.0, 1.0, 0.0],
                    [-1.2246467991473532e-16, -0.0, -1.0]]
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 4 hrs to fix
src/wafo/tests/test_misc.py on lines 583..588
src/wafo/tests/test_misc.py on lines 590..595
src/wafo/tests/test_misc.py on lines 604..609

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

    def test_h180_p0_r0(self):
        vals = rotation_matrix(heading=180, pitch=0, roll=0)
        truevals = [[-1.0, -1.2246467991473532e-16, 0.0],
                    [1.2246467991473532e-16, -1.0, 0.0],
                    [-0.0, 0.0, 1.0]]
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 4 hrs to fix
src/wafo/tests/test_misc.py on lines 583..588
src/wafo/tests/test_misc.py on lines 597..602
src/wafo/tests/test_misc.py on lines 604..609

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

    def test_h0_p0_r180(self):
        vals = rotation_matrix(heading=0, pitch=180, roll=0)
        truevals = [[-1.0, 0.0, 1.2246467991473532e-16],
                    [-0.0, 1.0, 0.0],
                    [-1.2246467991473532e-16, -0.0, -1.0]]
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 4 hrs to fix
src/wafo/tests/test_misc.py on lines 583..588
src/wafo/tests/test_misc.py on lines 590..595
src/wafo/tests/test_misc.py on lines 597..602

Duplicated Code

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

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

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

Tuning

This issue has a mass of 52.

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

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

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

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

Refactorings

Further Reading

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

        vals = piecewise([x < 0, x >= 0], [lambda x: -x, lambda x: x], (x,))
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 3 hrs to fix
src/wafo/tests/test_misc.py on lines 516..516

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

        vals = piecewise([x < 0, x >= 0], [lambda x: -x, lambda x: x], (x,))
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 3 hrs to fix
src/wafo/tests/test_misc.py on lines 511..511

Duplicated Code

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

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

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

Tuning

This issue has a mass of 47.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(vals, [[4., 2., nan, 2., 4.],
                               [2., 1., nan, 1., 2.],
                               [nan, nan, nan, nan, nan],
                               [2., 1., nan, 1., 2.],
                               [4., 2., nan, 2., 4.]])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 3 hrs to fix
src/wafo/tests/test_misc.py on lines 561..565

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(vals, [[4., 2., nan, 2., 4.],
                               [2., 1., nan, 1., 2.],
                               [nan, nan, nan, nan, nan],
                               [2., 1., nan, 1., 2.],
                               [4., 2., nan, 2., 4.]])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 3 hrs to fix
src/wafo/tests/test_misc.py on lines 574..578

Duplicated Code

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

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

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

Tuning

This issue has a mass of 44.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(tp3[-5:], [[0.01552179103405038, 0.4231341427960734, 1.0],
                               [1.0975044823202456, -0.001996117244712714, 0.5],
                               [1.090222560678279, -0.00927803888667933, 0.5],
                               [0.48055514444405156, 0.600389377347548, 0.5],
                               [0.032002742614076624, 0.15183697551757316, 0.5]])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 3 hrs to fix
src/wafo/tests/test_misc.py on lines 225..229

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(tp3[:5], [[0.035781645324019146, 0.28906389183961456, 1.0],
                              [0.03602834384593512, 0.5672658361052029, 1.0],
                              [0.038166226239640555, 0.7646144604852383, 1.0],
                              [0.06383640016547976, 0.9238130173264235, 1.0],
                              [0.07759005562881188, 0.9962873791766909, 1.0]])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 3 hrs to fix
src/wafo/tests/test_misc.py on lines 218..222

Duplicated Code

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

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

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

Tuning

This issue has a mass of 40.

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

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

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

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

Refactorings

Further Reading

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

    def test_rotate_360deg(self):
        vals = rotate_2d(x=1, y=0, angle_deg=360)
        truevals = [1.0, -2.4492935982947064e-16]
        assert_allclose(vals, truevals)
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 614..617
src/wafo/tests/test_misc.py on lines 619..622
src/wafo/tests/test_misc.py on lines 624..627

Duplicated Code

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

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

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

    def test_rotate_0deg(self):
        vals = rotate_2d(x=1, y=0, angle_deg=0)
        truevals = [1.0, 0.0]
        assert_allclose(vals, truevals)
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 619..622
src/wafo/tests/test_misc.py on lines 624..627
src/wafo/tests/test_misc.py on lines 629..632

Duplicated Code

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

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

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

Tuning

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

    def test_rotate_180deg(self):
        vals = rotate_2d(x=1, y=0, angle_deg=180)
        truevals = [-1.0, 1.2246467991473532e-16]
        assert_allclose(vals, truevals)
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 614..617
src/wafo/tests/test_misc.py on lines 619..622
src/wafo/tests/test_misc.py on lines 629..632

Duplicated Code

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

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

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

Tuning

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

    def test_rotate_90deg(self):
        vals = rotate_2d(x=1, y=0, angle_deg=90)
        truevals = [6.123233995736766e-17, 1.0]
        assert_allclose(vals, truevals)
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 614..617
src/wafo/tests/test_misc.py on lines 624..627
src/wafo/tests/test_misc.py on lines 629..632

Duplicated Code

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

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

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

Tuning

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

    assert_allclose(indg[np.r_[0, 1, 2, -3, -2, -1]], [0, 1, 2, 9521, 9522, 9523])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 269..269

Duplicated Code

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

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

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

    assert_allclose(inds[np.r_[0, 1, 2, -3, -2, -1]], [6, 7, 8, 9509, 9510, 9511])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 270..270

Duplicated Code

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

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

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

Tuning

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

        assert_allclose(vals, [[4., 2., -0., 2., 4.],
                               [2., 1., -0., 1., 2.],
                               [-0., -0., 0., 0., 0.],
                               [2., 1., 0., 1., 2.],
                               [4., 2., 0., 2., 4.]])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/kdetools/tests/test_gridding.py on lines 39..43

Duplicated Code

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

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

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

        vals = piecewise([X * Y < 0, ], [lambda x, y: -x * y, lambda x, y: x * y], (X, Y))
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 558..558

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

                         [lambda x, y: -x * y, lambda x, y: x * y], (X, Y),
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 547..547

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    x = sin(t) + 0.1 * sin(50 * t)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 191..191

Duplicated Code

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

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

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

Tuning

This issue has a mass of 31.

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

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

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

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

Refactorings

Further Reading

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

    x = sin(t) + 0.1 * sin(50 * t)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 150..150

Duplicated Code

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

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

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

Tuning

This issue has a mass of 31.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(itc, [28, 31, 39, 56, 64, 69, 78, 82, 83, 89, 94, 101, 108,
                          119, 131, 140, 148, 159, 173, 184])
Severity: Major
Found in src/wafo/tests/test_misc.py and 4 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 430..433
src/wafo/tests/test_misc.py on lines 434..440
src/wafo/tests/test_misc.py on lines 442..445
src/wafo/tests/test_misc.py on lines 446..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 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 5 locations. Consider refactoring.
Open

    assert_allclose(ti, [0., 0.16534698, 0.33069396, 0.49604095, 0.66138793,
                         0.82673491, 0.99208189, 1.15742887, 1.32277585, 1.48812284,
                         1.65346982, 1.8188168, 1.98416378, 2.14951076, 2.31485774,
                         2.48020473, 2.64555171, 2.81089869, 2.97624567, 3.14159265])
Severity: Major
Found in src/wafo/tests/test_misc.py and 4 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 256..257
src/wafo/tests/test_misc.py on lines 430..433
src/wafo/tests/test_misc.py on lines 434..440
src/wafo/tests/test_misc.py on lines 446..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 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 5 locations. Consider refactoring.
Open

    assert_allclose(x, [5., 4.93180652, 4.72908621, 4.39736876, 3.94570255,
                        3.38640786, 2.73474079, 2.00847712, 1.22742744, 0.41289673,
                        -0.41289673, -1.22742744, -2.00847712, -2.73474079, -3.38640786,
                        -3.94570255, -4.39736876, -4.72908621, -4.93180652, -5.])
Severity: Major
Found in src/wafo/tests/test_misc.py and 4 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 256..257
src/wafo/tests/test_misc.py on lines 434..440
src/wafo/tests/test_misc.py on lines 442..445
src/wafo/tests/test_misc.py on lines 446..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 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 5 locations. Consider refactoring.
Open

    assert_allclose(y, [0.00000000e+00, 8.22972951e-01, 1.62349735e+00,
                        2.37973697e+00, 3.07106356e+00, 3.67861955e+00,
                        4.18583239e+00, 4.57886663e+00, 4.84700133e+00,
                        4.98292247e+00, 4.98292247e+00, 4.84700133e+00,
                        4.57886663e+00, 4.18583239e+00, 3.67861955e+00,
Severity: Major
Found in src/wafo/tests/test_misc.py and 4 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 256..257
src/wafo/tests/test_misc.py on lines 430..433
src/wafo/tests/test_misc.py on lines 442..445
src/wafo/tests/test_misc.py on lines 446..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 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 5 locations. Consider refactoring.
Open

    assert_allclose(ri, [5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5., 5.,
                         5., 5., 5., 5., 5., 5., 5.])
Severity: Major
Found in src/wafo/tests/test_misc.py and 4 other locations - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 256..257
src/wafo/tests/test_misc.py on lines 430..433
src/wafo/tests/test_misc.py on lines 434..440
src/wafo/tests/test_misc.py on lines 442..445

Duplicated Code

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

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

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

Tuning

This issue has a mass of 29.

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

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

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

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

Refactorings

Further Reading

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

        vals = piecewise([x < 0, x >= 0], [-1, 1], x)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 536..536

Duplicated Code

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

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

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

Tuning

This issue has a mass of 29.

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

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

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

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

Refactorings

Further Reading

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

        vals = piecewise([x < 0, x >= 0], [-1, 1], x)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 2 hrs to fix
src/wafo/tests/test_misc.py on lines 541..541

Duplicated Code

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

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

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

Tuning

This issue has a mass of 29.

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

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

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

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

Refactorings

Further Reading

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

    assert common_shape(A, B, C, shape=(3, 4, 1)) == (3, 4, 5)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 278..278

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    assert common_shape(A, B, C, shape=(3, 4, 1)) == (3, 4, 5)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 283..283

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

        vals = piecewise([X * Y < -0.5, X * Y > 0.5],
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 570..570

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

        vals = piecewise([X * Y < -0.5, X * Y > 0.5],
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 557..557

Duplicated Code

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

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

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

Tuning

This issue has a mass of 27.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(y, [1.00000000e+00, 9.80785280e-01, 9.23879533e-01,
                        8.31469612e-01, 7.07106781e-01, 5.55570233e-01,
                        3.82683432e-01, 1.95090322e-01, 6.12323400e-17,
                        -1.95090322e-01, -3.82683432e-01, -5.55570233e-01,
                        -7.07106781e-01, -8.31469612e-01, -9.23879533e-01,
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 400..403
src/wafo/tests/test_misc.py on lines 404..409
src/wafo/tests/test_misc.py on lines 414..417

Duplicated Code

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

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

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

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(y, [1.00000000e+00, 9.80785280e-01, 9.23879533e-01,
                        8.31469612e-01, 7.07106781e-01, 5.55570233e-01,
                        3.82683432e-01, 1.95090322e-01, 6.12323400e-17,
                        -1.95090322e-01, -3.82683432e-01, -5.55570233e-01,
                        -7.07106781e-01, -8.31469612e-01, -9.23879533e-01,
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 400..403
src/wafo/tests/test_misc.py on lines 414..417
src/wafo/tests/test_misc.py on lines 418..423

Duplicated Code

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

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

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

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(x, [0., 0.19634954, 0.39269908, 0.58904862, 0.78539816,
                        0.9817477, 1.17809725, 1.37444679, 1.57079633, 1.76714587,
                        1.96349541, 2.15984495, 2.35619449, 2.55254403, 2.74889357,
                        2.94524311, 3.14159265])
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 400..403
src/wafo/tests/test_misc.py on lines 404..409
src/wafo/tests/test_misc.py on lines 418..423

Duplicated Code

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

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

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

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(x, [0., 0.19634954, 0.39269908, 0.58904862, 0.78539816,
                        0.9817477, 1.17809725, 1.37444679, 1.57079633, 1.76714587,
                        1.96349541, 2.15984495, 2.35619449, 2.55254403, 2.74889357,
                        2.94524311, 3.14159265])
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 404..409
src/wafo/tests/test_misc.py on lines 414..417
src/wafo/tests/test_misc.py on lines 418..423

Duplicated Code

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

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

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

Tuning

This issue has a mass of 26.

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

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

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

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

Refactorings

Further Reading

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

    y = rfcfilter(x[:, 1], h=0.0, method=1)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 187..187

Duplicated Code

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

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

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

Tuning

This issue has a mass of 25.

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

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

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

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

Refactorings

Further Reading

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

    y1 = rfcfilter(x[:, 1], h=0.5, method=0)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 183..183

Duplicated Code

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

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

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

Tuning

This issue has a mass of 25.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(A2, [0., 1., 2., 3., 4., 5., 6., 7., 8., 9., 15., 16., 17., 18., 19.])
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 297..297
src/wafo/tests/test_misc.py on lines 298..298

Duplicated Code

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

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

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

Tuning

This issue has a mass of 24.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(B2, [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2])
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 296..296
src/wafo/tests/test_misc.py on lines 298..298

Duplicated Code

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

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

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

Tuning

This issue has a mass of 24.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(C2, [0, 1, 2, 3, 4, 0, 1, 2, 3, 4, 0, 1, 2, 3, 4])
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 296..296
src/wafo/tests/test_misc.py on lines 297..297

Duplicated Code

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

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

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

Tuning

This issue has a mass of 24.

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

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

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

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

Refactorings

Further Reading

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

        data2 = _misc_numba.disufq(amp.real, amp.imag, w, kw, water_depth,
                                       g, nmin, nmax, cases, ns)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 79..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 24.

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

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

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

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

Refactorings

Further Reading

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

            data = c_library.disufq(amp.real, amp.imag, w, kw, water_depth, g,
                                    nmin, nmax, cases, ns)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 75..76

Duplicated Code

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

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

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

Tuning

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

    _ti, tp = t[ind], x[ind]
Severity: Major
Found in src/wafo/tests/test_misc.py and 7 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 911..911
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

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

    _ti, tp = t[ind], x[ind]
Severity: Major
Found in src/wafo/tests/test_misc.py and 7 other locations - About 1 hr to fix
src/wafo/kdetools/kernels.py on lines 911..911
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 205..205

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

    ddcrit = 9.81 / 2 * dt * dt
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter2.py on lines 85..85

Duplicated Code

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

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

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

Tuning

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

                      (2*10**150, 10**1, 3445.7046987235925),
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**10, 10**3, 17806.86990703),  # 17806.8699
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**10, 10**1, 222.0855685296785),  # 222.0855
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**15, 10**3, 29319.7953969),  # 29312.
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**10, 10**2, 2008.160435246),  # 2008.1604
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**12, 10**5, 1781117.60524975244),
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**10, 10**0, 23.7189981105004),  # 23.719
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378

Duplicated Code

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

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

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

Tuning

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

                      (2*10**6, 10**6, 1.386286880999543e+6),
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 373..373
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

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

                      (2*10**15, 10**5, 2471893.13564544),
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 371..371
src/wafo/tests/test_misc.py on lines 372..372
src/wafo/tests/test_misc.py on lines 374..374
src/wafo/tests/test_misc.py on lines 375..375
src/wafo/tests/test_misc.py on lines 376..376
src/wafo/tests/test_misc.py on lines 377..377
src/wafo/tests/test_misc.py on lines 378..378
src/wafo/tests/test_misc.py on lines 379..379

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(y[0:5], [-1.2004945, 0.83950546, -0.09049454, -0.02049454, -0.09049454])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 188..188

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

    'z, w, desired', [(10**6, 10**6-2, 26.937872935327604),
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 370..370

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(y1[0:5], [-1.2004945, 0.83950546, -0.43049454, 0.34950546, -0.51049454])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 184..184

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

                      (10**6, 10**6-1, 13.815510557964274),
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 369..369

Duplicated Code

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

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

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

Tuning

This issue has a mass of 22.

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

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

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

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

Refactorings

Further Reading

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

        x = piecewise([[True, False]], [1], [0, 0])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 491..491

Duplicated Code

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

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

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

        x = piecewise([[True, False]], [2], [1, 2])
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 471..471

Duplicated Code

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

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

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

    C = np.ones((1, 5)) * 5
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 276..276

Duplicated Code

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

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

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

Tuning

This issue has a mass of 20.

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

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

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

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

Refactorings

Further Reading

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

    C = np.ones((1, 5)) * 5
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 281..281

Duplicated Code

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

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

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

    itph = findtp(x1[:, 1], 0.3, 'Mw')
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 235..235

Duplicated Code

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

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

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

    itp = findtp(x1[:, 1], 0, 'Mw')
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 236..236

Duplicated Code

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

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

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

Tuning

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

    t = np.linspace(0, 7 * pi, 250)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 142..142
src/wafo/tests/test_misc.py on lines 149..149
src/wafo/tests/test_misc.py on lines 190..190
src/wafo/wavemodels.py on lines 23..23
src/wafo/wavemodels.py on lines 27..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

    t = np.linspace(0, 7 * pi, 250)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 131..131
src/wafo/tests/test_misc.py on lines 149..149
src/wafo/tests/test_misc.py on lines 190..190
src/wafo/wavemodels.py on lines 23..23
src/wafo/wavemodels.py on lines 27..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

    t = np.linspace(0, 7 * pi, 250)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 131..131
src/wafo/tests/test_misc.py on lines 142..142
src/wafo/tests/test_misc.py on lines 149..149
src/wafo/wavemodels.py on lines 23..23
src/wafo/wavemodels.py on lines 27..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

    t = np.linspace(0, 7 * pi, 250)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 131..131
src/wafo/tests/test_misc.py on lines 142..142
src/wafo/tests/test_misc.py on lines 190..190
src/wafo/wavemodels.py on lines 23..23
src/wafo/wavemodels.py on lines 27..27

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

    assert common_shape(A, B, C) == (4, 5)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 282..282

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

    assert common_shape(A, B, C) == (4, 5)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 277..277

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(t0, [0.84910514, 2.2933879, 7.13205663,
                         8.57630119, 13.41484739, 14.85909194,
                         19.69776067, 21.14204343])
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 134..134
src/wafo/tests/test_misc.py on lines 171..171

Duplicated Code

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

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

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

        assert_allclose(ind1, [0, 9, 32, 53, 74, 95, 116, 137])
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 134..134
src/wafo/tests/test_misc.py on lines 136..138

Duplicated Code

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

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

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

    assert_allclose(ind, [9, 25, 80, 97, 151, 168, 223, 239])
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 136..138
src/wafo/tests/test_misc.py on lines 171..171

Duplicated Code

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

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

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

    x1 = x[0:200, :]
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 254..254

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

    x1 = x[0:200, :]
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 234..234

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

    [A2, B2, C2] = argsreduce(cond, A, B, C)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 291..291

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

    [_A1, B1, _C1] = argsreduce(cond, A, B, C)
Severity: Major
Found in src/wafo/tests/test_misc.py and 1 other location - About 1 hr to fix
src/wafo/tests/test_misc.py on lines 294..294

Duplicated Code

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

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

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

        X, Y = np.meshgrid(x, x)
Severity: Major
Found in src/wafo/tests/test_misc.py and 30 other locations - About 55 mins to fix
src/wafo/containers.py on lines 203..203
src/wafo/demos.py on lines 13..13
src/wafo/demos.py on lines 23..23
src/wafo/graphutil.py on lines 214..215
src/wafo/integrate.py on lines 83..83
src/wafo/interpolate.py on lines 1161..1161
src/wafo/kdetools/gridding.py on lines 339..339
src/wafo/kdetools/kernels.py on lines 116..116
src/wafo/markov.py on lines 489..493
src/wafo/misc.py on lines 494..494
src/wafo/misc.py on lines 1334..1334
src/wafo/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/transform/models.py on lines 231..231
src/wafo/transform/models.py on lines 240..240

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        X, Y = np.meshgrid(x, x)
Severity: Major
Found in src/wafo/tests/test_misc.py and 30 other locations - About 55 mins to fix
src/wafo/containers.py on lines 203..203
src/wafo/demos.py on lines 13..13
src/wafo/demos.py on lines 23..23
src/wafo/graphutil.py on lines 214..215
src/wafo/integrate.py on lines 83..83
src/wafo/interpolate.py on lines 1161..1161
src/wafo/kdetools/gridding.py on lines 339..339
src/wafo/kdetools/kernels.py on lines 116..116
src/wafo/markov.py on lines 489..493
src/wafo/misc.py on lines 494..494
src/wafo/misc.py on lines 1334..1334
src/wafo/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 556..556
src/wafo/tests/test_misc.py on lines 569..569
src/wafo/transform/models.py on lines 231..231
src/wafo/transform/models.py on lines 240..240

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        X, Y = np.meshgrid(x, x)
Severity: Major
Found in src/wafo/tests/test_misc.py and 30 other locations - About 55 mins to fix
src/wafo/containers.py on lines 203..203
src/wafo/demos.py on lines 13..13
src/wafo/demos.py on lines 23..23
src/wafo/graphutil.py on lines 214..215
src/wafo/integrate.py on lines 83..83
src/wafo/interpolate.py on lines 1161..1161
src/wafo/kdetools/gridding.py on lines 339..339
src/wafo/kdetools/kernels.py on lines 116..116
src/wafo/markov.py on lines 489..493
src/wafo/misc.py on lines 494..494
src/wafo/misc.py on lines 1334..1334
src/wafo/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 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 4 locations. Consider refactoring.
Open

        assert_allclose(vals, [2.5, 1.5, 0.5, 0.5, 1.5, 2.5])
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 55 mins to fix
src/wafo/tests/test_misc.py on lines 512..512
src/wafo/tests/test_misc.py on lines 532..532
src/wafo/tests/test_misc.py on lines 537..537

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(vals, [-1., -1., -1., 1., 1., 1.])
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 55 mins to fix
src/wafo/tests/test_misc.py on lines 512..512
src/wafo/tests/test_misc.py on lines 522..522
src/wafo/tests/test_misc.py on lines 532..532

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(vals, [2.5, 1.5, 0.5, 0.5, 1.5, 2.5])
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 55 mins to fix
src/wafo/tests/test_misc.py on lines 522..522
src/wafo/tests/test_misc.py on lines 532..532
src/wafo/tests/test_misc.py on lines 537..537

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(vals, [2.5, 1.5, 0.5, 0.5, 1.5, 2.5])
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 55 mins to fix
src/wafo/tests/test_misc.py on lines 512..512
src/wafo/tests/test_misc.py on lines 522..522
src/wafo/tests/test_misc.py on lines 537..537

Duplicated Code

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

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

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

Tuning

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

        a = np.arange(np.prod(shape)).reshape(shape)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/kdetools.py on lines 417..417

Duplicated Code

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

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

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

        def fun1(x, y, scale=1.):
            return x * y / scale
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 55 mins to fix
src/wafo/stats/_continuous_distns.py on lines 3570..3570

Duplicated Code

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

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

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

    assert opt['arg1'] == 5
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 55 mins to fix
src/wafo/tests/test_misc.py on lines 312..312

Duplicated Code

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

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

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

    assert opt['arg2'] == 3
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 55 mins to fix
src/wafo/tests/test_misc.py on lines 311..311

Duplicated Code

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

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

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

try:
    from wafo import c_library
except ImportError:
    c_library = None
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 55 mins to fix
src/wafo/spectrum/core.py on lines 29..32

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(tr[::40], true_tr)
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 50 mins to fix
src/wafo/tests/test_misc.py on lines 123..123
src/wafo/tests/test_objects.py on lines 97..97
src/wafo/tests/test_objects.py on lines 110..110

Duplicated Code

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

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

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

Tuning

This issue has a mass of 14.

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

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

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

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

Refactorings

Further Reading

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

    assert_allclose(y0[::40], true_y0)
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 50 mins to fix
src/wafo/tests/test_misc.py on lines 124..124
src/wafo/tests/test_objects.py on lines 97..97
src/wafo/tests/test_objects.py on lines 110..110

Duplicated Code

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

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

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

        sub = index2sub(shape, i, order=order)
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 50 mins to fix
src/wafo/interpolate.py on lines 1243..1243
src/wafo/kdetools/kernels.py on lines 128..128

Duplicated Code

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

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

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

        truth = [-0.007433524853697526, 1.0875397175924215, -1.0720654490829054,
                 1.0955083650755328, -1.0794045843842426, 1.0784939627613357,
                 -1.0995005995649583, 1.0809445217915996]
Severity: Major
Found in src/wafo/tests/test_misc.py and 2 other locations - About 50 mins to fix
src/wafo/spectrum/core.py on lines 1295..1295
src/wafo/stats/tests/test_fit.py on lines 134..134

Duplicated Code

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

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

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

    assert_allclose(y0,
                    [0.0265929056674, 1.00114978495, 1.92872202911, 2.8145300482, 3.6629257237])
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 50 mins to fix
src/wafo/tests/test_misc.py on lines 458..459

Duplicated Code

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

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

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

Tuning

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

        assert_allclose(data2, d_truth[i])
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 50 mins to fix
src/wafo/tests/test_misc.py on lines 334..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 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

    for name, val in true_sc.items():
        assert_allclose(val, sc[name])
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 50 mins to fix
src/wafo/tests/test_misc.py on lines 77..77

Duplicated Code

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

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

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

    assert_allclose(y1,
                    [1.00004046620, 0.95007409636, 0.90585612024, 0.86640213535, 0.83091299820])
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 50 mins to fix
src/wafo/tests/test_misc.py on lines 456..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 2 locations. Consider refactoring.
Open

        pos, c_shape = args_flat(x, 2, 3)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 50 mins to fix
src/wafo/tests/test_integrate.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 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 37 locations. Consider refactoring.
Open

    x = np.linspace(0, 1, 200)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

        x = np.linspace(-2.5, 2.5, 6)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

        x = np.linspace(-2.5, 2.5, 6)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

        x = np.linspace(-2, 2, 5)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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(-2, 2, 5)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

    phi = np.linspace(0, 45, 5)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

    g = np.linspace(-6, 4.5, 501)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

        x = np.linspace(-2.5, 2.5, 6)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

        x = np.linspace(-2.5, 2.5, 6)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 37 locations. Consider refactoring.
Open

        x = np.linspace(-2, 2, 5)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 923..923
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 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 11 locations. Consider refactoring.
Open

    x, y = polar2cart(t, r)
Severity: Major
Found in src/wafo/tests/test_misc.py and 10 other locations - About 45 mins to fix
src/wafo/demos.py on lines 114..114
src/wafo/gaussian.py on lines 344..344
src/wafo/gaussian.py on lines 393..393
src/wafo/misc.py on lines 2672..2672
src/wafo/misc.py on lines 2723..2723
src/wafo/spectrum/core.py on lines 4112..4112
src/wafo/spectrum/models.py on lines 319..319
src/wafo/spectrum/models.py on lines 2078..2078
src/wafo/stats/_continuous_distns.py on lines 8525..8525
src/wafo/tests/test_misc.py on lines 441..441

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

    ti, ri = cart2polar(x, y)
Severity: Major
Found in src/wafo/tests/test_misc.py and 10 other locations - About 45 mins to fix
src/wafo/demos.py on lines 114..114
src/wafo/gaussian.py on lines 344..344
src/wafo/gaussian.py on lines 393..393
src/wafo/misc.py on lines 2672..2672
src/wafo/misc.py on lines 2723..2723
src/wafo/spectrum/core.py on lines 4112..4112
src/wafo/spectrum/models.py on lines 319..319
src/wafo/spectrum/models.py on lines 2078..2078
src/wafo/stats/_continuous_distns.py on lines 8525..8525
src/wafo/tests/test_misc.py on lines 429..429

Duplicated Code

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

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

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

    opt = parse_kwargs(opt, arg1=5)
Severity: Major
Found in src/wafo/tests/test_misc.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/kdetools/kernels.py on lines 642..642
src/wafo/stats/core.py on lines 1382..1382

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

    nmax = n // 2 + 1
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 45 mins to fix
src/wafo/tests/test_misc.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 13.

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

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

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

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

Refactorings

Further Reading

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

    f = np.linspace(0., 3.0, n // 2 + 1)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 45 mins to fix
src/wafo/tests/test_misc.py on lines 67..67

Duplicated Code

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

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

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

    t = np.linspace(0, pi, 20)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 45 mins to fix
src/wafo/objects.py on lines 450..450

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

    assert B2.shape == (15,)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 45 mins to fix
src/wafo/tests/test_misc.py on lines 292..292

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

    assert B1.shape == (20,)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 45 mins to fix
src/wafo/tests/test_misc.py on lines 295..295

Duplicated Code

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

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

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

Tuning

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

    y = exp(x) + 0.1 * cos(20 * 2 * pi * x)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 45 mins to fix
src/wafo/doc/tutorial_scripts/chapter1.py on lines 44..44

Duplicated Code

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

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

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

    truth = [-0.007433524853697526, 1.0875397175924215, -1.0720654490829054, 1.0955083650755328,
             -1.0794045843842426, 1.0784939627613357, -1.0995005995649583, 1.0809445217915996,
             0.11983423290349654]
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 40 mins to fix
src/wafo/markov.py on lines 864..872

Duplicated Code

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

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

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

    assert d.test1 == 1
Severity: Major
Found in src/wafo/tests/test_misc.py and 11 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 98..98
src/wafo/tests/test_misc.py on lines 102..102
src/wafo/tests/test_misc.py on lines 501..501
src/wafo/tests/test_misc.py on lines 507..507
src/wafo/transform/tests/test_models.py on lines 12..12
src/wafo/transform/tests/test_models.py on lines 13..13
src/wafo/transform/tests/test_models.py on lines 38..38
src/wafo/transform/tests/test_models.py on lines 39..39
src/wafo/transform/tests/test_trdata.py on lines 15..15
src/wafo/transform/tests/test_trdata.py on lines 20..20
src/wafo/transform/tests/test_trdata.py on lines 21..21

Duplicated Code

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

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

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

        assert y.ndim == 0
Severity: Major
Found in src/wafo/tests/test_misc.py and 11 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 97..97
src/wafo/tests/test_misc.py on lines 98..98
src/wafo/tests/test_misc.py on lines 102..102
src/wafo/tests/test_misc.py on lines 507..507
src/wafo/transform/tests/test_models.py on lines 12..12
src/wafo/transform/tests/test_models.py on lines 13..13
src/wafo/transform/tests/test_models.py on lines 38..38
src/wafo/transform/tests/test_models.py on lines 39..39
src/wafo/transform/tests/test_trdata.py on lines 15..15
src/wafo/transform/tests/test_trdata.py on lines 20..20
src/wafo/transform/tests/test_trdata.py on lines 21..21

Duplicated Code

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

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

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

        assert y.ndim == 0
Severity: Major
Found in src/wafo/tests/test_misc.py and 11 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 97..97
src/wafo/tests/test_misc.py on lines 98..98
src/wafo/tests/test_misc.py on lines 102..102
src/wafo/tests/test_misc.py on lines 501..501
src/wafo/transform/tests/test_models.py on lines 12..12
src/wafo/transform/tests/test_models.py on lines 13..13
src/wafo/transform/tests/test_models.py on lines 38..38
src/wafo/transform/tests/test_models.py on lines 39..39
src/wafo/transform/tests/test_trdata.py on lines 15..15
src/wafo/transform/tests/test_trdata.py on lines 20..20
src/wafo/transform/tests/test_trdata.py on lines 21..21

Duplicated Code

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

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

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

    assert d.test1 == 5
Severity: Major
Found in src/wafo/tests/test_misc.py and 11 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 97..97
src/wafo/tests/test_misc.py on lines 98..98
src/wafo/tests/test_misc.py on lines 501..501
src/wafo/tests/test_misc.py on lines 507..507
src/wafo/transform/tests/test_models.py on lines 12..12
src/wafo/transform/tests/test_models.py on lines 13..13
src/wafo/transform/tests/test_models.py on lines 38..38
src/wafo/transform/tests/test_models.py on lines 39..39
src/wafo/transform/tests/test_trdata.py on lines 15..15
src/wafo/transform/tests/test_trdata.py on lines 20..20
src/wafo/transform/tests/test_trdata.py on lines 21..21

Duplicated Code

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

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

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

    assert d.test2 == 3
Severity: Major
Found in src/wafo/tests/test_misc.py and 11 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 97..97
src/wafo/tests/test_misc.py on lines 102..102
src/wafo/tests/test_misc.py on lines 501..501
src/wafo/tests/test_misc.py on lines 507..507
src/wafo/transform/tests/test_models.py on lines 12..12
src/wafo/transform/tests/test_models.py on lines 13..13
src/wafo/transform/tests/test_models.py on lines 38..38
src/wafo/transform/tests/test_models.py on lines 39..39
src/wafo/transform/tests/test_trdata.py on lines 15..15
src/wafo/transform/tests/test_trdata.py on lines 20..20
src/wafo/transform/tests/test_trdata.py on lines 21..21

Duplicated Code

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

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

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

        assert_allclose(x, [2, 3])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 472..472
src/wafo/tests/test_misc.py on lines 476..476
src/wafo/tests/test_misc.py on lines 480..480
src/wafo/tests/test_misc.py on lines 484..484
src/wafo/tests/test_misc.py on lines 487..487
src/wafo/tests/test_misc.py on lines 492..492

Duplicated Code

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

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

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

        assert_allclose(x, [1, 0])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 476..476
src/wafo/tests/test_misc.py on lines 480..480
src/wafo/tests/test_misc.py on lines 484..484
src/wafo/tests/test_misc.py on lines 487..487
src/wafo/tests/test_misc.py on lines 492..492
src/wafo/tests/test_misc.py on lines 496..496

Duplicated Code

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

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

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

        assert_allclose(x, [2, 0])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 472..472
src/wafo/tests/test_misc.py on lines 476..476
src/wafo/tests/test_misc.py on lines 480..480
src/wafo/tests/test_misc.py on lines 484..484
src/wafo/tests/test_misc.py on lines 487..487
src/wafo/tests/test_misc.py on lines 496..496

Duplicated Code

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

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

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

Tuning

This issue has a mass of 11.

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

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

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

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

Refactorings

Further Reading

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

        truepos1 = [[1, 2, 3]]
Severity: Minor
Found in src/wafo/tests/test_misc.py and 2 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 668..668
src/wafo/tests/test_misc.py on lines 675..675

Duplicated Code

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

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

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

        assert_allclose(x, [3, 4])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 472..472
src/wafo/tests/test_misc.py on lines 476..476
src/wafo/tests/test_misc.py on lines 480..480
src/wafo/tests/test_misc.py on lines 484..484
src/wafo/tests/test_misc.py on lines 492..492
src/wafo/tests/test_misc.py on lines 496..496

Duplicated Code

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

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

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

Tuning

This issue has a mass of 11.

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

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

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

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

Refactorings

Further Reading

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

        truepos1 = [[1, 2, 3]]
Severity: Minor
Found in src/wafo/tests/test_misc.py and 2 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 661..661
src/wafo/tests/test_misc.py on lines 668..668

Duplicated Code

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

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

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

        assert_allclose(x, [1, 0])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 472..472
src/wafo/tests/test_misc.py on lines 480..480
src/wafo/tests/test_misc.py on lines 484..484
src/wafo/tests/test_misc.py on lines 487..487
src/wafo/tests/test_misc.py on lines 492..492
src/wafo/tests/test_misc.py on lines 496..496

Duplicated Code

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

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

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

        assert_allclose(x, [1, 0])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 472..472
src/wafo/tests/test_misc.py on lines 476..476
src/wafo/tests/test_misc.py on lines 484..484
src/wafo/tests/test_misc.py on lines 487..487
src/wafo/tests/test_misc.py on lines 492..492
src/wafo/tests/test_misc.py on lines 496..496

Duplicated Code

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

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

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

Tuning

This issue has a mass of 11.

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

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

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

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

Refactorings

Further Reading

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

        truepos1 = [[1, 2, 3]]
Severity: Minor
Found in src/wafo/tests/test_misc.py and 2 other locations - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 661..661
src/wafo/tests/test_misc.py on lines 675..675

Duplicated Code

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

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

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

        assert_allclose(x, [0, -1])
Severity: Major
Found in src/wafo/tests/test_misc.py and 8 other locations - About 35 mins to fix
src/wafo/spectrum/tests/test_specdata1d.py on lines 136..137
src/wafo/spectrum/tests/test_specdata1d.py on lines 173..174
src/wafo/tests/test_misc.py on lines 472..472
src/wafo/tests/test_misc.py on lines 476..476
src/wafo/tests/test_misc.py on lines 480..480
src/wafo/tests/test_misc.py on lines 487..487
src/wafo/tests/test_misc.py on lines 492..492
src/wafo/tests/test_misc.py on lines 496..496

Duplicated Code

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

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

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

    sc = getshipchar(service_speed=10)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 35 mins to fix
src/wafo/sg_filter/demos.py on lines 465..465
src/wafo/spectrum/core.py on lines 1354..1354
src/wafo/spectrum/tests/test_models.py on lines 53..53
src/wafo/tests/test_gaussian.py on lines 63..63
src/wafo/tests/test_misc.py on lines 313..313

Duplicated Code

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

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

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

Tuning

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

    opt = parse_kwargs(opt, **opt2)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 35 mins to fix
src/wafo/containers.py on lines 366..366
src/wafo/containers.py on lines 596..599
src/wafo/containers.py on lines 615..615
src/wafo/integrate.py on lines 1034..1034
src/wafo/kdetools/kdetools.py on lines 219..219

Duplicated Code

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

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

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

Tuning

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

            ind1 = ind1[:-1]
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 35 mins to fix
src/wafo/integrate.py on lines 992..992
src/wafo/kdetools/kernels.py on lines 125..125
src/wafo/markov.py on lines 387..387
src/wafo/misc.py on lines 1090..1091
src/wafo/misc.py on lines 1501..1502

Duplicated Code

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

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

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

Tuning

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

    opt2 = dict(arg3=15)
Severity: Major
Found in src/wafo/tests/test_misc.py and 5 other locations - About 35 mins to fix
src/wafo/sg_filter/demos.py on lines 465..465
src/wafo/spectrum/core.py on lines 1354..1354
src/wafo/spectrum/tests/test_models.py on lines 53..53
src/wafo/tests/test_gaussian.py on lines 63..63
src/wafo/tests/test_misc.py on lines 320..320

Duplicated Code

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

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

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

    true_tr = [1.1105815186448, 1.2279645887599, 1.5012730905301, 1.8354286024587, 2.2439796716788]
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 35 mins to fix
src/wafo/kdetools/kernels.py on lines 416..416
src/wafo/stats/_continuous_distns.py on lines 4760..4760
src/wafo/tests/test_misc.py on lines 119..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 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

    true_y0 = [-0.010581518644884, 0.09386986278126, 0.09038009599066,
               0.08510005719242, 0.07803486510444]
Severity: Major
Found in src/wafo/tests/test_misc.py and 3 other locations - About 35 mins to fix
src/wafo/kdetools/kernels.py on lines 416..416
src/wafo/stats/_continuous_distns.py on lines 4760..4760
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 2 locations. Consider refactoring.
Open

        trueval = a[1, 2, 3]
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 35 mins to fix
src/wafo/spectrum/core.py on lines 3817..3817

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 1 == d.test1
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 108..108

Duplicated Code

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

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

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

    d.update(test1=5)
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 35 mins to fix
src/wafo/stats/estimation.py on lines 596..596

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 3 == d.test2
Severity: Minor
Found in src/wafo/tests/test_misc.py and 1 other location - About 35 mins to fix
src/wafo/tests/test_misc.py on lines 107..107

Duplicated Code

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

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

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

Tuning

This issue has a mass of 11.

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

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

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

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

Refactorings

Further Reading

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

        if method in [1, 0]:
Severity: Major
Found in src/wafo/tests/test_misc.py and 9 other locations - About 30 mins to fix
src/wafo/containers.py on lines 602..602
src/wafo/integrate.py on lines 967..967
src/wafo/integrate.py on lines 993..993
src/wafo/markov.py on lines 157..157
src/wafo/markov.py on lines 861..861
src/wafo/misc.py on lines 567..567
src/wafo/spectrum/core.py on lines 1765..1765
src/wafo/spectrum/core.py on lines 1999..1999
src/wafo/spectrum/core.py on lines 2150..2150

Duplicated Code

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

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

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