tomopy/tomopy

View on GitHub

Showing 347 of 347 total issues

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

            d = np.sqrt(p + alpha * np.abs(p.min()))
Severity: Minor
Found in source/tomopy/prep/stripe.py and 1 other location - About 35 mins to fix
source/tomopy/prep/stripe.py on lines 227..227

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

        sinosmooth[i] = np.real(
            ifft(fft(sinolist * listsign) * window) * listsign)[pad:ncol - pad]
Severity: Minor
Found in source/tomopy/prep/stripe.py and 1 other location - About 35 mins to fix
source/tomopy/prep/stripe.py on lines 624..624

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    matfilter = np.real(ifft2(fft2(matpad * matsign) * win2d) * matsign)
Severity: Minor
Found in source/tomopy/prep/stripe.py and 1 other location - About 35 mins to fix
source/tomopy/prep/stripe.py on lines 501..502

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    def fft(x, n=None, axis=-1, overwrite_input=False, extra_info=None):
        return np.fft.fft(x, n=n, axis=axis)
Severity: Minor
Found in source/tomopy/util/misc.py and 1 other location - About 35 mins to fix
source/tomopy/util/misc.py on lines 144..145

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    def ifft(x, n=None, axis=-1, overwrite_input=False, extra_info=None):
        return np.fft.ifft(x, n=n, axis=axis)
Severity: Minor
Found in source/tomopy/util/misc.py and 1 other location - About 35 mins to fix
source/tomopy/util/misc.py on lines 140..141

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    if len(listxmiss) > 0:
        sinogram[:, listxmiss] = finter(listxmiss, listy)
Severity: Minor
Found in source/tomopy/prep/stripe.py and 1 other location - About 35 mins to fix
source/tomopy/prep/stripe.py on lines 968..969

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

Function create_phantom_test has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

def create_phantom_test(args, bench_props, phantom):
    """
    Create test(s) for the specified algorithms
    """
    pyexe = pyctest.PYTHON_EXECUTABLE
Severity: Minor
Found in benchmarking/__init__.py - About 35 mins to fix

Cognitive Complexity

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

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

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

Further reading

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

                ne.evaluate("vec", local_dict={'vec': arr[slc_l_v]},
                            out=out[slc_l])
Severity: Minor
Found in source/tomopy/misc/morph.py and 1 other location - About 30 mins to fix
source/tomopy/misc/morph.py on lines 152..153

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

    def test_remove_stripe_ti(self):
        assert_allclose(
            srm.remove_stripe_ti(read_file('proj.npy')),
            read_file('remove_stripe_ti.npy'), rtol=1e-2)
Severity: Minor
Found in test/test_tomopy/test_prep/test_stripe.py and 1 other location - About 30 mins to fix
test/test_tomopy/test_prep/test_stripe.py on lines 72..75

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

    if (input_type != 'float32') and (input_type != 'uint16'):
        arr = dtype.as_float32(arr)  # silent convertion to float32 data type
Severity: Minor
Found in source/tomopy/misc/corr.py and 1 other location - About 30 mins to fix
source/tomopy/misc/corr.py on lines 442..443

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

    if (input_type != 'float32') and (input_type != 'uint16'):
        arr = dtype.as_float32(arr)  # silent convertion to float32 data type
Severity: Minor
Found in source/tomopy/misc/corr.py and 1 other location - About 30 mins to fix
source/tomopy/misc/corr.py on lines 382..383

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='shepp'),
                        read_file('gridrec_shepp.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='ramlak'),
                        read_file('gridrec_ramlak.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='hann'),
                        read_file('gridrec_hann.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='hamming'),
                        read_file('gridrec_hamming.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='cosine'),
                        read_file('gridrec_cosine.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='parzen'),
                        read_file('gridrec_parzen.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='none'),
                        read_file('gridrec_none.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161
test/test_tomopy/test_recon/test_algorithm.py on lines 163..167

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

        assert_allclose(recon(self.prj,
                              self.ang,
                              algorithm='gridrec',
                              filter_name='butterworth'),
                        read_file('gridrec_butterworth.npy'),
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 121..125
test/test_tomopy/test_recon/test_algorithm.py on lines 127..131
test/test_tomopy/test_recon/test_algorithm.py on lines 133..137
test/test_tomopy/test_recon/test_algorithm.py on lines 139..143
test/test_tomopy/test_recon/test_algorithm.py on lines 145..149
test/test_tomopy/test_recon/test_algorithm.py on lines 151..155
test/test_tomopy/test_recon/test_algorithm.py on lines 157..161

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

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

                ne.evaluate("vec", local_dict={'vec': arr[slc_r_v]},
                            out=out[slc_r])
Severity: Minor
Found in source/tomopy/misc/morph.py and 1 other location - About 30 mins to fix
source/tomopy/misc/morph.py on lines 150..151

Duplicated Code

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

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

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

Tuning

This issue has a mass of 32.

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

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

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

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

Refactorings

Further Reading

Severity
Category
Status
Source
Language