wafo-project/pywafo

View on GitHub
src/wafo/kdetools/tests/test_kdetools.py

Summary

Maintainability
F
2 wks
Test Coverage

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

        assert hs == pytest.approx(truehs, rel=1e-1)

Remove this commented out code.
Open

        # ei = np.random.normal(loc=0, scale=0.075, size=(N,))

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

        # data, x = self.data, self.x

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

        # N = 20

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

    # import sys;sys.argv = ['', 'Test.testName']

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

        # N = 20

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

        # print(score)

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

        # N = 20

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

        # truth = [-0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, 2.5601311219614983e-17, 2.130354199771828e-09, 0.0006689663809779967, 0.24691492972829443, 0.9132767047314845, 0.9998419777071581, 0.9999999999998436, 1.0, 1.0, 1.0000000000000004, 0.9999999999999999, 0.9999999999998432, 0.9998419777071702, 0.9132767047314807, 0.2469149297282834, 0.0006689663809778622, 2.1303541150096722e-09, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0, -0.0]

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

        # data, x = self.data, self.x

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

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

See

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

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

        truescore = [41622.23676564823, 36395.01646696339, 6220.123988861956, 47050.77278133661, 37815.54822669753, 20635.596126724387, 15105.874493049976, 19646.62527374109, 29786.92591405318, 17575.590435000646, 14816.388419050902, 30726.090375114676, 24237.028495747316, 35178.29480463215, 26203.1164484096, 21612.942219305998, 17666.6681374814, 21709.933568691424, 16081.755131309861, 20469.16256300024, 19264.346129769918, 20900.48127986247, 6409.342345424054, 6485.007538273512, 6466.709921475774, 14293.73265046957, 15840.552637563183, 13855.9320695519, 8432.890817403872, 10195.214948849045, 14225.890135454663, 5312.45091940059, 10993.513749869533, 5600.165342924938, 9043.347699064414, 9350.983529722893, 5354.316690059941, 6220.021253437557, 6154.590666910095, 6188.623741758889, 5956.812014277398, 6045.819290538599, 6418.390790579977, 6450.111010384022, 6497.28598031042, 6554.747127169262, 6596.457485540424, 6675.626835135936, 6738.9736786745925, 6803.844317552503, 6870.298106943677, 6938.403252331078, 7008.307295689638, 7079.985054384406, 7153.508116135097]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 4 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 379..379
src/wafo/kdetools/tests/test_kdetools.py on lines 381..381

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

        true_score = [70264.98913673757, 79485.27187312284, 52115.6036259286, 51181.84064152534, 27627.948627450376, 39293.321457632046, 48306.77954048321, 59950.001236073396, 109415.06765627922, 124196.2839041708, 93185.7413927379, 121761.13503783672, 140790.6682575987, 136917.23728413312, 169139.3201298805, 160478.72869914692, 187384.91530799554, 204663.49756319966, 229234.02784286902, 237289.68787823746, 248765.00505889987, 263422.09028058837, 295116.0491074402, 286801.65038687194, 306283.7366029765, 328511.1795126467, 353609.36377238564, 355948.9275937855, 366120.68784949754, 379570.2960667178, 402367.7995494029, 407941.2974613215, 427676.3076269373, 446163.0250985027, 454974.63321235974, 471478.0620289999, 483657.0038336324, 498372.4685033615, 511732.34852451197, 529399.4850641354, 541524.62931021, 552828.5552580808, 568949.1356118141, 584848.8148275309, 601185.7012318124, 614921.9428812155, 626327.1607127315, 641081.9571354779, 657531.3899661598, 671212.118985575, 687751.747434233, 699728.8500993064, 716680.6647774944, 731421.2021274817, 749769.3124353285]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 4 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 341..341
src/wafo/kdetools/tests/test_kdetools.py on lines 381..381

Duplicated Code

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

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

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

Tuning

This issue has a mass of 61.

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

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

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

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

        true_x = [0.03314080263491917, 0.038664269740739034, 0.04418773684655889, 0.049711203952378755, 0.05523467105819861, 0.060758138164018476, 0.06628160526983834, 0.0718050723756582, 0.07732853948147805, 0.08285200658729792, 0.08837547369311778, 0.09389894079893765, 0.09942240790475751, 0.10494587501057737, 0.11046934211639722, 0.1159928092222171, 0.12151627632803695, 0.12703974343385682, 0.13256321053967668, 0.13808667764549654, 0.1436101447513164, 0.14913361185713625, 0.1546570789629561, 0.160180546068776, 0.16570401317459585, 0.1712274802804157, 0.17675094738623556, 0.18227441449205542, 0.18779788159787528, 0.19332134870369516, 0.19884481580951502, 0.20436828291533488, 0.20989175002115473, 0.2154152171269746, 0.22093868423279445, 0.2264621513386143, 0.2319856184444342, 0.23750908555025405, 0.2430325526560739, 0.24855601976189376, 0.25407948686771364, 0.2596029539735335, 0.26512642107935336, 0.2706498881851732, 0.27617335529099307, 0.28169682239681293, 0.2872202895026328, 0.29274375660845264, 0.2982672237142725, 0.30379069082009236, 0.3093141579259122, 0.31483762503173207, 0.32036109213755193, 0.3258845592433718, 0.3314080263491917]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 4 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 341..341
src/wafo/kdetools/tests/test_kdetools.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 61.

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

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

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

See codeclimate-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 = [8.288052022525543e-17, 6.467470785160458e-17, 1.7762703232931328e-17, 0.0, 1.1175588343682177e-16, 1.1856000708271898e-13, 4.8327815314193965e-11, 1.019611394387776e-08, 1.0251349844021577e-06, 4.264591854871683e-05, 0.0008514687523433396, 0.00919426596957344, 0.05501961404353164, 0.18729865349891328, 0.44789470046124336, 0.8659316673414831, 0.9914888642824607, 0.9996518793705619, 0.9999903801533727, 0.9999903801533725, 0.9996518793705619, 0.9914888642824613, 0.865931667341485, 0.44789470046124524, 0.1872986534989137, 0.055019614043531694, 0.009194265969573491, 0.0008514687523433715, 4.264591854871559e-05, 1.025134984402249e-06, 1.0196113947170725e-08, 4.832782404903089e-11, 1.1860349438401879e-13, 6.037616600701264e-17, 0.0, 1.5203669716322612e-17, 0.0, 0.0]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 3 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 364..364
src/wafo/kdetools/tests/test_kdetools.py on lines 390..390

Duplicated Code

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

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

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

        truth = [0.00046534573451870246, 0.0008211551575028886, 0.0014373128508957964, 0.002494531474529822, 0.004290416469982636, 0.007307212623105813, 0.012311147719779397, 0.02048977307665743, 0.03362350522922616, 0.054257913598390994, 0.08577632634077768, 0.13215517470695637, 0.1970586336732946, 0.28198756468594455, 0.3837886612978354, 0.4929678141427555, 0.5947585454583219, 0.6731907667222461, 0.7156972370715711, 0.7156972370715708, 0.6731907667222452, 0.5947585454583199, 0.49296781414275354, 0.3837886612978331, 0.2819875646859424, 0.19705863367329274, 0.13215517470695493, 0.08577632634077662, 0.054257913598390155, 0.0336235052292256, 0.02048977307665702, 0.0123111477197791, 0.007307212623105654, 0.004290416469982478, 0.0024945314745297743, 0.0014373128508957482, 0.0008211551575028447, 0.0004653457345187116]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 3 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 339..339
src/wafo/kdetools/tests/test_kdetools.py on lines 390..390

Duplicated Code

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

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

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

        truth = [0.0, 0.0, 3.3840823413810475e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 2.2047456866703477e-17, 1.6759316303718756e-14, 1.6630722546315143e-05, 0.19738507290116047, 0.9820106163748646, 0.9999991987020067, 1.0, 0.9999999999999999, 1.0, 1.0, 1.0, 0.9999999999999999, 0.9999991987013542, 0.9820106163748648, 0.19738507290115023, 1.663072254616563e-05, 1.6708126240962134e-14, 2.004314260609393e-17, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 3 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 339..339
src/wafo/kdetools/tests/test_kdetools.py on lines 364..364

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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(f.data[::5],
                        [3.14313544673463, 3.14582567119112, 3.149199078830904,
                         3.153335095194225, 3.15813722171621, 3.16302709623568,
                         3.16631430398602, 3.164138775969285, 3.14947062082316,
                         3.11341295908516, 3.05213808272656, 2.976097561057097,
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 3 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 314..323

Duplicated Code

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

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

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

Tuning

This issue has a mass of 43.

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

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

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

See codeclimate-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(f1.data[::5],
                        [2.7832831899382, 2.83222307174095, 2.891112685251379,
                         2.9588984473431, 3.03155510969298, 3.1012027219652127,
                         3.1565263737763, 3.18517573180120, 3.177939796091202,
                         3.13336188049535, 3.06057968378847, 2.978164236442354,
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 3 hrs to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 302..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 43.

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

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

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

SCIPYVERSION = tuple(int(v) for v in scipy.__version__.split('.')[:2])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 2 hrs to fix
src/wafo/stats/_distn_infrastructure.py on lines 6..6

Duplicated Code

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

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

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

Tuning

This issue has a mass of 35.

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

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

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

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

Refactorings

Further Reading

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

        x = np.linspace(0, max(np.ravel(data)) + 1, 10)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 2 hrs to fix
src/wafo/kdetools/tests/test_gridding.py on lines 33..33
src/wafo/kdetools/tests/test_gridding.py on lines 52..52
src/wafo/kdetools/tests/test_gridding.py on lines 76..76
src/wafo/kdetools/tests/test_kdetools.py on lines 219..219
src/wafo/kdetools/tests/test_kdetools.py on lines 232..232

Duplicated Code

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

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

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

Tuning

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

        x = np.linspace(0, max(np.ravel(data)) + 1, 10)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 2 hrs to fix
src/wafo/kdetools/tests/test_gridding.py on lines 33..33
src/wafo/kdetools/tests/test_gridding.py on lines 52..52
src/wafo/kdetools/tests/test_gridding.py on lines 76..76
src/wafo/kdetools/tests/test_kdetools.py on lines 181..181
src/wafo/kdetools/tests/test_kdetools.py on lines 232..232

Duplicated Code

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

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

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

Tuning

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

        x = np.linspace(0, max(np.ravel(data)) + 1, 3)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 2 hrs to fix
src/wafo/kdetools/tests/test_gridding.py on lines 33..33
src/wafo/kdetools/tests/test_gridding.py on lines 52..52
src/wafo/kdetools/tests/test_gridding.py on lines 76..76
src/wafo/kdetools/tests/test_kdetools.py on lines 181..181
src/wafo/kdetools/tests/test_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 29.

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

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

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

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

Refactorings

Further Reading

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

        true_tprb_e = [0.0, 0.0, 0.0, 0.5068370416969658, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 0.5068370416969631, 0.0, 0.0, 0.0]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 357..357

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

        x = np.linspace(0.01, max(data) + 1, 10)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 17..17

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(fbest.data[::10][13:], truth[13:], rtol=rtol, atol=1e-7)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 366..366

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

        true_tprb_e_x = [-1.4710267742304424, -1.287148427451637, -1.1032700806728317, -0.9193917338940265, -0.7355133871152209, -0.5516350403364156, -0.3677566935576104, -0.1838783467788052, 0.0, 0.18387834677880566, 0.36775669355761087, 0.5516350403364161, 0.7355133871152217, 0.9193917338940265, 1.1032700806728322, 1.2871484274516378, 1.4710267742304426]
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 356..356

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(prb_s.data[::10][13:], truth[13:])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 392..392

Duplicated Code

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

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

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

Tuning

This issue has a mass of 23.

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

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

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

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

Refactorings

Further Reading

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

        kde0 = wk.KDE(data, hs=0.5, alpha=0.0, inc=512)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 212..212
src/wafo/kdetools/tests/test_kdetools.py on lines 86..86

Duplicated Code

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

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

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

        kde0 = wk.KDE(data, hs=0.5, alpha=0.0, inc=16)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter5.py on lines 212..212
src/wafo/kdetools/tests/test_kdetools.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 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 15 locations. Consider refactoring.
Open

        assert_allclose(f, [1.03982714,  0.45839018,  0.39514782,  0.32860602,
                            0.26433318, 0.20717946,  0.15907684,  0.1201074,
                            0.08941027,  0.06574882])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(fx, [-0.11582450668441863, -0.12901768780183628,
                             -0.04402464127812092, 0.0636190549560749,
                             0.09345144501310157, 0.07573621607126926,
                             0.06149475587201987, 0.04550210608639078,
                             0.024427027615689087, 0.00885576504750473])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [0.0541248,  0.16555235,  0.33084399,  0.45293325,
                            0.48345808, 0.48345808,  0.45293325,  0.33084399,
                            0.16555235,  0.0541248])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(fx, [0.2039735, 0.40252503, 0.54595078,
                             0.52219649, 0.3906213, 0.26381501, 0.16407362,
                             0.08270612, 0.02991145, 0.00720821])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(fx, [-0.11911419724002906, -0.13440000694772541,
                             -0.044400116190638696, 0.0677695267531197,
                             0.09555596523854318, 0.07498819087690148,
                             0.06167607128369182, 0.04678588231996062,
                             0.024515979196411814, 0.008022010381009501])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(fx, [0.08728138131197069, 0.07558648034784508,
                             0.05093715852686607, 0.07908624791267539,
                             0.10495675573359599, 0.07916167222333347,
                             0.048168330179460386, 0.03438361415806721,
                             0.02197927811015286, 0.009222988165160621])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(fx, [0.08499284131672676, 0.07572564161758065,
                             0.05329987919556978, 0.07849796347259348,
                             0.10232741197885842, 0.07869015379158453,
                             0.049431823916945394, 0.034527256372343613,
                             0.021517998409663567, 0.009527401063843402])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [0.17252055,  0.41014271,  0.61349072,  0.57023834,
                            0.37198073, 0.21409279,  0.12738463,  0.07460326,
                            0.03956191,  0.01887164])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [1.03982714,  0.45839018,  0.39514782,  0.32860602,
                            0.26433318, 0.20717946,  0.15907684,  0.1201074,
                            0.08941027,  0.06574882])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [1.0401892415290148, 0.45838973393693677,
                            0.39514689240671547, 0.32860531818532457,
                            0.2643330110605783, 0.20717975528556506,
                            0.15907696844388747, 0.12010770443337843,
                            0.08941129458260941, 0.06574899139165799])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [0.2039735,  0.40252503,  0.54595078,  0.52219649,
                            0.3906213, 0.26381501,  0.16407362,  0.08270612,
                            0.02991145, 0.00720821])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [1.03982714,  0.45839018,  0.39514782,  0.32860602,
                            0.26433318, 0.20717946,  0.15907684,  0.1201074,
                            0.08941027,  0.06574882])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

        assert_allclose(f, [0.0541248,  0.16555235,  0.33084399,  0.45293325,
                            0.48345808, 0.48345808,  0.45293325,  0.33084399,
                            0.16555235,  0.0541248])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 94..96
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..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 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 15 locations. Consider refactoring.
Open

        assert_allclose(fx, [0.2039735, 0.40252503, 0.54595078,
                             0.52219649, 0.3906213, 0.26381501, 0.16407362,
                             0.08270612, 0.02991145, 0.00720821])
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 22..25
src/wafo/kdetools/tests/test_kdetools.py on lines 89..91
src/wafo/kdetools/tests/test_kdetools.py on lines 99..103
src/wafo/kdetools/tests/test_kdetools.py on lines 106..110
src/wafo/kdetools/tests/test_kdetools.py on lines 118..122
src/wafo/kdetools/tests/test_kdetools.py on lines 125..129
src/wafo/kdetools/tests/test_kdetools.py on lines 147..149
src/wafo/kdetools/tests/test_kdetools.py on lines 151..153
src/wafo/kdetools/tests/test_kdetools.py on lines 155..157
src/wafo/kdetools/tests/test_kdetools.py on lines 160..164
src/wafo/kdetools/tests/test_kdetools.py on lines 171..173
src/wafo/kdetools/tests/test_kdetools.py on lines 184..186
src/wafo/kdetools/tests/test_kdetools.py on lines 202..204
src/wafo/kdetools/tests/test_kdetools.py on lines 222..224

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f0.data, f0.args), 0.9962507385131669)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 191..191
src/wafo/kdetools/tests/test_kdetools.py on lines 195..195
src/wafo/kdetools/tests/test_kdetools.py on lines 210..210

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f0.data, f0.args), 0.9871189376720593)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 191..191
src/wafo/kdetools/tests/test_kdetools.py on lines 195..195
src/wafo/kdetools/tests/test_kdetools.py on lines 214..214

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f0.data, f0.args), 0.9319800260106625)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 195..195
src/wafo/kdetools/tests/test_kdetools.py on lines 210..210
src/wafo/kdetools/tests/test_kdetools.py on lines 214..214

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f0.data, f0.args), 0.9319799696210691)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 3 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 191..191
src/wafo/kdetools/tests/test_kdetools.py on lines 210..210
src/wafo/kdetools/tests/test_kdetools.py on lines 214..214

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        fbest = bkreg.prb_search_best(hsfun='hste', alpha=0.05, color='g')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter1.py on lines 85..85
src/wafo/kdetools/tests/test_kdetools.py on lines 372..372

Duplicated Code

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

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

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

Tuning

This issue has a mass of 19.

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

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

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

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

Refactorings

Further Reading

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

        fbest = bkreg.prb_search_best(hsfun='hste', alpha=0.05, color='g')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter1.py on lines 85..85
src/wafo/kdetools/tests/test_kdetools.py on lines 332..332

Duplicated Code

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

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

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

Tuning

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

        kde = wk.TKDE(data, hs=0.5, L2=0.5)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 6 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter3.py on lines 38..38
src/wafo/doc/tutorial_scripts/chapter5.py on lines 186..186
src/wafo/kdetools/kernels.py on lines 643..643
src/wafo/kdetools/tests/test_kdetools.py on lines 200..200
src/wafo/kdetools/tests/test_kdetools.py on lines 220..220
src/wafo/stats/estimation.py on lines 1477..1477

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

        kde = wk.KDE(data, hs=0.5, alpha=0.5)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 6 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter3.py on lines 38..38
src/wafo/doc/tutorial_scripts/chapter5.py on lines 186..186
src/wafo/kdetools/kernels.py on lines 643..643
src/wafo/kdetools/tests/test_kdetools.py on lines 145..145
src/wafo/kdetools/tests/test_kdetools.py on lines 200..200
src/wafo/stats/estimation.py on lines 1477..1477

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

        kde = wk.KDE(data, hs=0.5, alpha=0.5)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 6 other locations - About 1 hr to fix
src/wafo/doc/tutorial_scripts/chapter3.py on lines 38..38
src/wafo/doc/tutorial_scripts/chapter5.py on lines 186..186
src/wafo/kdetools/kernels.py on lines 643..643
src/wafo/kdetools/tests/test_kdetools.py on lines 145..145
src/wafo/kdetools/tests/test_kdetools.py on lines 220..220
src/wafo/stats/estimation.py on lines 1477..1477

Duplicated Code

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

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

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

Tuning

This issue has a mass of 18.

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

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

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

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

Refactorings

Further Reading

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

if __name__ == "__main__":
    # import sys;sys.argv = ['', 'Test.testName']
    unittest.main()
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 12 other locations - About 1 hr to fix
src/wafo/kdetools/tests/test_gridding.py on lines 114..116
src/wafo/kdetools/tests/test_kernels.py on lines 146..148
src/wafo/sg_filter/tests/test_sg_filter.py on lines 78..80
src/wafo/spectrum/tests/test_models.py on lines 131..132
src/wafo/tests/test_bitwise.py on lines 36..38
src/wafo/tests/test_containers.py on lines 56..58
src/wafo/tests/test_dct_pack.py on lines 65..67
src/wafo/tests/test_gaussian.py on lines 169..171
src/wafo/tests/test_integrate.py on lines 122..124
src/wafo/tests/test_integrate_oscillating.py on lines 391..393
src/wafo/tests/test_objects.py on lines 187..189
src/wafo/tests/test_padua.py on lines 100..101

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        f1 = kreg(output='plot', title='Kernel regression', plotflag=1)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 1 hr to fix
src/wafo/kdetools/demo.py on lines 105..105
src/wafo/kdetools/demo.py on lines 142..142
src/wafo/kdetools/demo.py on lines 145..145
src/wafo/kdetools/tests/test_kdetools.py on lines 287..287

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        f = kreg(output='plotobj', title='Kernel regression', plotflag=1)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 1 hr to fix
src/wafo/kdetools/demo.py on lines 105..105
src/wafo/kdetools/demo.py on lines 142..142
src/wafo/kdetools/demo.py on lines 145..145
src/wafo/kdetools/tests/test_kdetools.py on lines 290..290

Duplicated Code

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

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

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

Tuning

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

            np.exp(-(x - 1)**2 / (2 * 0.7**2))
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/kdetools/demo.py on lines 223..223

Duplicated Code

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

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

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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(kde0.eval_points([1, 2]), 0.11329600006973661)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 1 hr to fix
src/wafo/tests/test_bitwise.py on lines 28..28
src/wafo/tests/test_bitwise.py on lines 29..29

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(f, [0.011494108953097538, 0.0348546729842836,
                            0.08799292403553607, 0.18568717590587996,
                            0.32473136104523725, 0.46543163412700084,
                            0.5453201564089711, 0.5300582814373698,
                            0.44447650672207173, 0.3411961246641896,
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 1 hr to fix
src/wafo/stats/_continuous_distns.py on lines 4759..4759

Duplicated Code

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

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

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

Tuning

This issue has a mass of 17.

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

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

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

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

Refactorings

Further Reading

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

        bkreg = wk.BKRegression(XDATA, YDATA, method='wilson')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 1252..1252
src/wafo/kdetools/tests/test_kdetools.py on lines 240..240
src/wafo/kdetools/tests/test_kdetools.py on lines 371..371
src/wafo/spectrum/core.py on lines 3513..3513

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

        bkreg = wk.BKRegression(XDATA, YDATA, method='wilson')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 1252..1252
src/wafo/kdetools/tests/test_kdetools.py on lines 240..240
src/wafo/kdetools/tests/test_kdetools.py on lines 351..351
src/wafo/spectrum/core.py on lines 3513..3513

Duplicated Code

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

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

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

Tuning

This issue has a mass of 16.

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

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

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

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

Refactorings

Further Reading

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

        f0 = kde0.eval_grid_fast(x, x, output='plot')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 1 hr to fix
src/wafo/interpolate.py on lines 1252..1252
src/wafo/kdetools/tests/test_kdetools.py on lines 351..351
src/wafo/kdetools/tests/test_kdetools.py on lines 371..371
src/wafo/spectrum/core.py on lines 3513..3513

Duplicated Code

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

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

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

        fx = kde0.eval_grid(x, r=2)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 11 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 98..98
src/wafo/kdetools/tests/test_kdetools.py on lines 117..117
src/wafo/kdetools/tests/test_kdetools.py on lines 124..124
src/wafo/kdetools/tests/test_kdetools.py on lines 169..169
src/wafo/kdetools/tests/test_kdetools.py on lines 182..182
src/wafo/markov.py on lines 496..496
src/wafo/markov.py on lines 497..497
src/wafo/stats/_distn_infrastructure.py on lines 72..72
src/wafo/stats/_distn_infrastructure.py on lines 104..104
src/wafo/stats/core.py on lines 1335..1335
src/wafo/stats/estimation.py on lines 1614..1614

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        fx = kde0.eval_grid_fast(x, r=1)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 11 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 98..98
src/wafo/kdetools/tests/test_kdetools.py on lines 105..105
src/wafo/kdetools/tests/test_kdetools.py on lines 124..124
src/wafo/kdetools/tests/test_kdetools.py on lines 169..169
src/wafo/kdetools/tests/test_kdetools.py on lines 182..182
src/wafo/markov.py on lines 496..496
src/wafo/markov.py on lines 497..497
src/wafo/stats/_distn_infrastructure.py on lines 72..72
src/wafo/stats/_distn_infrastructure.py on lines 104..104
src/wafo/stats/core.py on lines 1335..1335
src/wafo/stats/estimation.py on lines 1614..1614

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        fx = kde0.eval_grid_fast(x, r=2)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 11 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 98..98
src/wafo/kdetools/tests/test_kdetools.py on lines 105..105
src/wafo/kdetools/tests/test_kdetools.py on lines 117..117
src/wafo/kdetools/tests/test_kdetools.py on lines 169..169
src/wafo/kdetools/tests/test_kdetools.py on lines 182..182
src/wafo/markov.py on lines 496..496
src/wafo/markov.py on lines 497..497
src/wafo/stats/_distn_infrastructure.py on lines 72..72
src/wafo/stats/_distn_infrastructure.py on lines 104..104
src/wafo/stats/core.py on lines 1335..1335
src/wafo/stats/estimation.py on lines 1614..1614

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        kde = wk.KDE(data, hs=0.5)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 11 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 98..98
src/wafo/kdetools/tests/test_kdetools.py on lines 105..105
src/wafo/kdetools/tests/test_kdetools.py on lines 117..117
src/wafo/kdetools/tests/test_kdetools.py on lines 124..124
src/wafo/kdetools/tests/test_kdetools.py on lines 182..182
src/wafo/markov.py on lines 496..496
src/wafo/markov.py on lines 497..497
src/wafo/stats/_distn_infrastructure.py on lines 72..72
src/wafo/stats/_distn_infrastructure.py on lines 104..104
src/wafo/stats/core.py on lines 1335..1335
src/wafo/stats/estimation.py on lines 1614..1614

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        kde = wk.KDE(data, hs=0.5)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 11 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 98..98
src/wafo/kdetools/tests/test_kdetools.py on lines 105..105
src/wafo/kdetools/tests/test_kdetools.py on lines 117..117
src/wafo/kdetools/tests/test_kdetools.py on lines 124..124
src/wafo/kdetools/tests/test_kdetools.py on lines 169..169
src/wafo/markov.py on lines 496..496
src/wafo/markov.py on lines 497..497
src/wafo/stats/_distn_infrastructure.py on lines 72..72
src/wafo/stats/_distn_infrastructure.py on lines 104..104
src/wafo/stats/core.py on lines 1335..1335
src/wafo/stats/estimation.py on lines 1614..1614

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        fx = kde0.eval_grid(x, r=1)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 11 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 105..105
src/wafo/kdetools/tests/test_kdetools.py on lines 117..117
src/wafo/kdetools/tests/test_kdetools.py on lines 124..124
src/wafo/kdetools/tests/test_kdetools.py on lines 169..169
src/wafo/kdetools/tests/test_kdetools.py on lines 182..182
src/wafo/markov.py on lines 496..496
src/wafo/markov.py on lines 497..497
src/wafo/stats/_distn_infrastructure.py on lines 72..72
src/wafo/stats/_distn_infrastructure.py on lines 104..104
src/wafo/stats/core.py on lines 1335..1335
src/wafo/stats/estimation.py on lines 1614..1614

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f, x), 0.92576174424281876)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 158..158
src/wafo/kdetools/tests/test_kdetools.py on lines 165..165
src/wafo/kdetools/tests/test_kdetools.py on lines 188..188
src/wafo/kdetools/tests/test_kdetools.py on lines 206..206
src/wafo/kdetools/tests/test_kdetools.py on lines 226..226

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f, x), 0.94787730659349068)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 165..165
src/wafo/kdetools/tests/test_kdetools.py on lines 175..175
src/wafo/kdetools/tests/test_kdetools.py on lines 188..188
src/wafo/kdetools/tests/test_kdetools.py on lines 206..206
src/wafo/kdetools/tests/test_kdetools.py on lines 226..226

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f, x), 0.97323338046725172)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 158..158
src/wafo/kdetools/tests/test_kdetools.py on lines 165..165
src/wafo/kdetools/tests/test_kdetools.py on lines 175..175
src/wafo/kdetools/tests/test_kdetools.py on lines 206..206
src/wafo/kdetools/tests/test_kdetools.py on lines 226..226

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f, x), 0.9479438058416647)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 158..158
src/wafo/kdetools/tests/test_kdetools.py on lines 175..175
src/wafo/kdetools/tests/test_kdetools.py on lines 188..188
src/wafo/kdetools/tests/test_kdetools.py on lines 206..206
src/wafo/kdetools/tests/test_kdetools.py on lines 226..226

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f, x), 0.97323338046725172)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 158..158
src/wafo/kdetools/tests/test_kdetools.py on lines 165..165
src/wafo/kdetools/tests/test_kdetools.py on lines 175..175
src/wafo/kdetools/tests/test_kdetools.py on lines 188..188
src/wafo/kdetools/tests/test_kdetools.py on lines 206..206

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(np.trapz(f, x), 0.92938023659047952)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 5 other locations - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 158..158
src/wafo/kdetools/tests/test_kdetools.py on lines 165..165
src/wafo/kdetools/tests/test_kdetools.py on lines 175..175
src/wafo/kdetools/tests/test_kdetools.py on lines 188..188
src/wafo/kdetools/tests/test_kdetools.py on lines 226..226

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        print(prb_e.args.ravel()[10:-10].tolist())
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 360..360

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(prb_e.args.ravel()[10:-10], true_tprb_e_x)
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 355..355

Duplicated Code

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

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

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

Tuning

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

        print(fbest.data[::10].tolist())
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 363..363

Duplicated Code

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

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

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

        print(prb_s.data[::10].tolist())
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 55 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 334..334

Duplicated Code

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

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

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

Tuning

This issue has a mass of 15.

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

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

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

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

Refactorings

Further Reading

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

        prb_e = bkreg.prb_empirical(alpha=0.05)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 14 other locations - About 45 mins to fix
src/wafo/covariance/core.py on lines 705..705
src/wafo/covariance/core.py on lines 716..716
src/wafo/doc/tutorial_scripts/chapter1.py on lines 46..46
src/wafo/doc/tutorial_scripts/chapter1.py on lines 178..178
src/wafo/doc/tutorial_scripts/chapter2.py on lines 128..128
src/wafo/doc/tutorial_scripts/chapter2.py on lines 142..142
src/wafo/doc/tutorial_scripts/chapter4.py on lines 62..62
src/wafo/doc/tutorial_scripts/chapter5.py on lines 117..117
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 93..93
src/wafo/spectrum/core.py on lines 2624..2624
src/wafo/spectrum/core.py on lines 4371..4371
src/wafo/spectrum/core.py on lines 4378..4378
src/wafo/spectrum/core.py on lines 4387..4387
src/wafo/transform/models.py on lines 223..223

Duplicated Code

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

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

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

        f0 = kde.eval_grid_fast(output='plot')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 7 other locations - About 45 mins to fix
src/wafo/doc/tutorial_scripts/chapter4.py on lines 40..40
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 70..70
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 71..71
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 89..89
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 90..90
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 91..91
src/wafo/kdetools/tests/test_kdetools.py on lines 212..212

Duplicated Code

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

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

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

Tuning

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

        f0 = kde.eval_grid_fast(output='plot')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 7 other locations - About 45 mins to fix
src/wafo/doc/tutorial_scripts/chapter4.py on lines 40..40
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 70..70
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 71..71
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 89..89
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 90..90
src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 91..91
src/wafo/kdetools/tests/test_kdetools.py on lines 193..193

Duplicated Code

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

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

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

        score = fbest.score.data.tolist()
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 45 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 373..373

Duplicated Code

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

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

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

Tuning

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

        score = fbest.score.data.tolist()
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 45 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 335..335

Duplicated Code

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

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

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

Tuning

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

        self.x = np.linspace(0, max(self.data) + 1, 10)
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 45 mins to fix
src/wafo/stats/_continuous_distns.py on lines 8469..8469

Duplicated Code

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

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

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

Tuning

This issue has a mass of 13.

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

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

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

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

Refactorings

Further Reading

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

        self.assertIsInstance(f0, wo.PlotData)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 190..190
src/wafo/kdetools/tests/test_kdetools.py on lines 194..194
src/wafo/kdetools/tests/test_kdetools.py on lines 213..213
src/wafo/spectrum/models.py on lines 2101..2101

Duplicated Code

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

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

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

Tuning

This issue has a mass of 12.

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

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

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

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

Refactorings

Further Reading

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

        self.assertIsInstance(f0, wo.PlotData)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 194..194
src/wafo/kdetools/tests/test_kdetools.py on lines 209..209
src/wafo/kdetools/tests/test_kdetools.py on lines 213..213
src/wafo/spectrum/models.py on lines 2101..2101

Duplicated Code

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

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

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

Tuning

This issue has a mass of 12.

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

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

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

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

Refactorings

Further Reading

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

        self.assertIsInstance(f0, wo.PlotData)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 190..190
src/wafo/kdetools/tests/test_kdetools.py on lines 194..194
src/wafo/kdetools/tests/test_kdetools.py on lines 209..209
src/wafo/spectrum/models.py on lines 2101..2101

Duplicated Code

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

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

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

Tuning

This issue has a mass of 12.

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

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

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

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

Refactorings

Further Reading

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

        self.assertIsInstance(f0, wo.PlotData)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 4 other locations - About 40 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 190..190
src/wafo/kdetools/tests/test_kdetools.py on lines 209..209
src/wafo/kdetools/tests/test_kdetools.py on lines 213..213
src/wafo/spectrum/models.py on lines 2101..2101

Duplicated Code

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

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

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

        f0 = kde(output='plot')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 32 other locations - About 35 mins to fix
src/wafo/containers.py on lines 140..140
src/wafo/kdetools/tests/test_kdetools.py on lines 189..189
src/wafo/objects.py on lines 1113..1113
src/wafo/spectrum/tests/test_models.py on lines 76..76
src/wafo/stats/_continuous_distns.py on lines 386..386
src/wafo/stats/_continuous_distns.py on lines 1198..1198
src/wafo/stats/_continuous_distns.py on lines 1423..1423
src/wafo/stats/_continuous_distns.py on lines 1483..1483
src/wafo/stats/_continuous_distns.py on lines 1666..1666
src/wafo/stats/_continuous_distns.py on lines 2492..2492
src/wafo/stats/_continuous_distns.py on lines 2818..2818
src/wafo/stats/_continuous_distns.py on lines 3282..3282
src/wafo/stats/_continuous_distns.py on lines 3341..3341
src/wafo/stats/_continuous_distns.py on lines 3528..3528
src/wafo/stats/_continuous_distns.py on lines 4069..4069
src/wafo/stats/_continuous_distns.py on lines 4219..4219
src/wafo/stats/_continuous_distns.py on lines 4262..4262
src/wafo/stats/_continuous_distns.py on lines 4839..4839
src/wafo/stats/_continuous_distns.py on lines 4893..4893
src/wafo/stats/_continuous_distns.py on lines 4943..4943
src/wafo/stats/_continuous_distns.py on lines 5574..5574
src/wafo/stats/_continuous_distns.py on lines 5719..5719
src/wafo/stats/_continuous_distns.py on lines 6006..6006
src/wafo/stats/_continuous_distns.py on lines 6116..6116
src/wafo/stats/_continuous_distns.py on lines 6386..6386
src/wafo/stats/_continuous_distns.py on lines 6521..6521
src/wafo/stats/_continuous_distns.py on lines 6801..6801
src/wafo/stats/_continuous_distns.py on lines 6802..6802
src/wafo/stats/_continuous_distns.py on lines 7046..7046
src/wafo/stats/_continuous_distns.py on lines 7585..7585
src/wafo/stats/_continuous_distns.py on lines 7828..7828
src/wafo/stats/_continuous_distns.py on lines 8002..8002

Duplicated Code

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

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

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

        f0 = kde(output='plot')
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 32 other locations - About 35 mins to fix
src/wafo/containers.py on lines 140..140
src/wafo/kdetools/tests/test_kdetools.py on lines 208..208
src/wafo/objects.py on lines 1113..1113
src/wafo/spectrum/tests/test_models.py on lines 76..76
src/wafo/stats/_continuous_distns.py on lines 386..386
src/wafo/stats/_continuous_distns.py on lines 1198..1198
src/wafo/stats/_continuous_distns.py on lines 1423..1423
src/wafo/stats/_continuous_distns.py on lines 1483..1483
src/wafo/stats/_continuous_distns.py on lines 1666..1666
src/wafo/stats/_continuous_distns.py on lines 2492..2492
src/wafo/stats/_continuous_distns.py on lines 2818..2818
src/wafo/stats/_continuous_distns.py on lines 3282..3282
src/wafo/stats/_continuous_distns.py on lines 3341..3341
src/wafo/stats/_continuous_distns.py on lines 3528..3528
src/wafo/stats/_continuous_distns.py on lines 4069..4069
src/wafo/stats/_continuous_distns.py on lines 4219..4219
src/wafo/stats/_continuous_distns.py on lines 4262..4262
src/wafo/stats/_continuous_distns.py on lines 4839..4839
src/wafo/stats/_continuous_distns.py on lines 4893..4893
src/wafo/stats/_continuous_distns.py on lines 4943..4943
src/wafo/stats/_continuous_distns.py on lines 5574..5574
src/wafo/stats/_continuous_distns.py on lines 5719..5719
src/wafo/stats/_continuous_distns.py on lines 6006..6006
src/wafo/stats/_continuous_distns.py on lines 6116..6116
src/wafo/stats/_continuous_distns.py on lines 6386..6386
src/wafo/stats/_continuous_distns.py on lines 6521..6521
src/wafo/stats/_continuous_distns.py on lines 6801..6801
src/wafo/stats/_continuous_distns.py on lines 6802..6802
src/wafo/stats/_continuous_distns.py on lines 7046..7046
src/wafo/stats/_continuous_distns.py on lines 7585..7585
src/wafo/stats/_continuous_distns.py on lines 7828..7828
src/wafo/stats/_continuous_distns.py on lines 8002..8002

Duplicated Code

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

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

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

        rtol = 6e-2 if SCIPYVERSION < (1, 3) else 1e-7
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 30 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 325..325
src/wafo/stats/_distn_infrastructure.py on lines 100..100

Duplicated Code

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

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

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

Tuning

This issue has a mass of 10.

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

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

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

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

Refactorings

Further Reading

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

    @pytest.mark.skipif(SCIPYVERSION<(1,3),
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 2 other locations - About 30 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 387..387
src/wafo/stats/_distn_infrastructure.py on lines 100..100

Duplicated Code

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

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

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

Tuning

This issue has a mass of 10.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(kde0.hs, 0.19682759537327105)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 3 other locations - About 30 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 81..81
src/wafo/transform/tests/test_models.py on lines 24..24
src/wafo/transform/tests/test_models.py on lines 25..25

Duplicated Code

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

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

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

Tuning

This issue has a mass of 10.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(kde0.inc, 64)
Severity: Major
Found in src/wafo/kdetools/tests/test_kdetools.py and 3 other locations - About 30 mins to fix
src/wafo/kdetools/tests/test_kdetools.py on lines 80..80
src/wafo/transform/tests/test_models.py on lines 24..24
src/wafo/transform/tests/test_models.py on lines 25..25

Duplicated Code

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

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

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

Tuning

This issue has a mass of 10.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(f0.data, t)
Severity: Minor
Found in src/wafo/kdetools/tests/test_kdetools.py and 1 other location - About 30 mins to fix
src/wafo/tests/test_integrate_oscillating.py on lines 265..265

Duplicated Code

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

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

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