Showing 129 of 135 total issues
Function _arange_levels
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _arange_levels(self, jrotn, par, iso, evalues, evecs, shift_enr=[0.0]):
Function plot_eigenfunctions
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_eigenfunctions(self, nlevels, show=False, fname=None,
Function optimize_intensity_by_svd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def optimize_intensity_by_svd(self, niter=1, derivative='n', tol=0.1,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, model, filep, rotc=0.0, shift_by=0.0, cfunc=None):
Function plot_hamiltonian_colormesh
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def plot_hamiltonian_colormesh(self, rows=None, cols=None, show=False,
Function _calculate_numerical_derivatives
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _calculate_numerical_derivatives(self, ypar, yfixed, calculate_data,
Function optimize_levels_by_svd
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def optimize_levels_by_svd(self, niter=1, derivative='n', tol=0.1,
Similar blocks of code found in 4 locations. Consider refactoring. Open
d = self.calculate_coeff_D(xgrid, self.x[inds], self.x[inds-1])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Function form_tridiag_matrix
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def form_tridiag_matrix(self, u, v, w, k1=-1, k2=0, k3=1):
Similar blocks of code found in 4 locations. Consider refactoring. Open
a = self.calculate_coeff_A(xgrid, self.x[inds], self.x[inds-1])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
c = self.calculate_coeff_C(xgrid, self.x[inds], self.x[inds-1])
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
if self.solver == 'sinc':
self.rgrid, self.rstep = np.linspace(
self.rmin, self.rmax, num=self.ngrid,
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Avoid deeply nested control flow statements. Open
if j not in memoize:
elem = self._get_dydp_elem(iprm[:4], sk, sk_grid,
sk_coef, j, evecs_found)
dydp[countj, prm] = elem[countj]
Function calculate_partition_functions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calculate_partition_functions(self, Ia=0, Ib=0, T=296,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, objs, eig_decomp='lapack', lapack_driver='evr',
Function calculate_Einstein_coefficients
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def calculate_Einstein_coefficients(self, wavens, dmfs=None, ninter=1000,
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, npoints, rgrid, solver='sinc', alpha=0.0, rbar=0.0):
Function _get_default_jrange
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _get_default_jrange(self, uterms, uj, lterms, lj):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(self, molecule, masses=None, niso=None, refj=None, ref_enr=None):
Function _write_pointwise_data
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _write_pointwise_data(self, fname, xpoints, ypoints, fixed):