Similar blocks of code found in 2 locations. Consider refactoring.
self.ensure(
r[0] >= self.map_rmin and r[0] < r[1] and r[1] <= self.map_rmax,
(
"The parameters [r0, r1] must be between %g and %g, "
"and in ascending order."
Similar blocks of code found in 2 locations. Consider refactoring.
self.ensure(
y[0] >= self.map_ymin and y[0] < y[1] and y[1] <= self.map_ymax,
(
"The parameters [y0, y1] must be between %g and %g, "
"and in ascending order."
File lelib.py
has 258 lines of code (exceeds 250 allowed). Consider refactoring.
Similar blocks of code found in 2 locations. Consider refactoring.
for t in self.x[1:]:
self.y1[t] = self.map(self.r, self.y1[t - 1])
Similar blocks of code found in 2 locations. Consider refactoring.
for t in self.x[1:]:
self.y2[t] = self.map(self.r, self.y2[t - 1])
Identical blocks of code found in 2 locations. Consider refactoring.
m.ensure(x.sum() == n * (n + 1) / 2, "the sum of the elements of x is not correct")
Similar blocks of code found in 5 locations. Consider refactoring.
m.ensure(len(x) == n + 1, "x should be a vector of size %d" % (n + 1))
Similar blocks of code found in 5 locations. Consider refactoring.
m.ensure(len(x) == n + 1, "x should be a vector of size %d" % (n + 1))
Similar blocks of code found in 5 locations. Consider refactoring.
m.ensure(
len(ydiff) == n + 1, "the vector y2-y1 should have a size equal to %d" % (n + 1)
Identical blocks of code found in 2 locations. Consider refactoring.
m.ensure(x.sum() == n * (n + 1) / 2, "the sum of the elements of x is not correct")
Similar blocks of code found in 5 locations. Consider refactoring.
m.ensure(len(y1) == n + 1, "y1 should be a vector of size %d" % (n + 1))
Similar blocks of code found in 5 locations. Consider refactoring.
m.ensure(len(y1) == n + 1, "y1 should be a vector of size %d" % (n + 1))
Similar blocks of code found in 3 locations. Consider refactoring.
self.ensure(
(r >= self.map_rmin and r <= self.map_rmax),
"The growth parameter r must be between %g and %g",
self.map_rmin,
self.map_rmax,
Similar blocks of code found in 3 locations. Consider refactoring.
self.ensure(
x0 >= self.map_ymin and x0 <= self.map_ymax,
"The initial condition x0 should be in [%g, %g].",
self.map_ymin,
self.map_ymax,
Similar blocks of code found in 3 locations. Consider refactoring.
self.ensure(
x1 >= self.map_ymin and x1 <= self.map_ymax,
"The initial condition x1 should be in [%g, %g].",
self.map_ymin,
self.map_ymax,
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring.
def __init__(self, r, n, x0, x1, s=0, mapname="logistic"):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def __init__(self, r, n, x0, s=0, mapname="logistic"):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def __init__(self, r, n=1000, x0=0.5, s=2000, mapname="logistic"):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring.
def __init__(self, r, y, n=100, s=200, mapname="logistic"):