Use 'from scipy import special' instead Open
import scipy.special as special
- Read upRead up
- Exclude checks
Emitted when a submodule of a package is imported and aliased with the same name, e.g., instead of import concurrent.futures as futures
use from concurrent import futures
.
Consider using '{cosh
: derivative_cosh, cos
: derivative_cos, sin
: derivative_sin, ... }' instead of a call to 'dict'. Open
f_dic = dict(cosh=derivative_cosh,
- Read upRead up
- Exclude checks
Emitted when using dict() to create a dictionary instead of a literal '{ ... }'. The literal is faster as it avoids an additional function call.
Unused argument 'n' Open
def derivative_exp(n):
- Read upRead up
- Exclude checks
Used when a function or method argument is not used.
Unable to import 'numpy' Open
from numpy import (cos, sin, tan, cosh, sinh, tanh,
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
Unused log2 imported from numpy Open
from numpy import (cos, sin, tan, cosh, sinh, tanh,
- Read upRead up
- Exclude checks
Used when an imported module or variable is not used.
Unable to import 'numpy' Open
import numpy as np
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
Unused log10 imported from numpy Open
from numpy import (cos, sin, tan, cosh, sinh, tanh,
- Read upRead up
- Exclude checks
Used when an imported module or variable is not used.
Unable to import 'scipy.special' Open
import scipy.special as special
- Read upRead up
- Exclude checks
Used when pylint has been unable to import a module.
Similar blocks of code found in 2 locations. Consider refactoring. Open
def ddtan(x):
return 2 * tan(x) / cos(x)**2
- 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
def ddtanh(x):
return -2 * sinh(x) / cosh(x) ** 3
- 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
Missing function or method docstring Open
def derivative_tan(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_cosh(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_tanh(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_exp(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_expm1(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_log1p(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_arctanh(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_arccos(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_sqrt(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_log(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def get_function(fun_name, n=1):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_inv(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_arcsinh(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Variable name sx
doesn't conform to '[a-z_][a-z0-9_]{2,30}$' pattern ('[a-z_][a-z0-9_]{2,30}$' pattern) Open
sx = sqrt(x)
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Missing function or method docstring Open
def derivative_sinh(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def darccos(x):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_arccosh(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def dddarccos(x):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_log2(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def dddarcsin(x):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_arcsin(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_arctan(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_square(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def ddarccos(x):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_exp2(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def ddarcsin(x):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_sin(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_cos(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def darcsin(x):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.
Missing function or method docstring Open
def derivative_log10(n):
- Read upRead up
- Exclude checks
Used when a function or method has no docstring. Some special methods like init do not require a docstring.