Wrong type-annotation for solver argument in simulation object initialization
Opened this issue · 0 comments
DuncDennis commented
(Version v0.0.2 of LorenzPy)
The type annotations of all systems using the solver
argument are wrong. There are three different kinds of problems:
- For all autonomous flows, the type-annotation for the
solver
argument usesstr
twice:
def __init__(
self,
sigma: float = 10.0,
rho: float = 28.0,
beta: float = 8 / 3,
dt: float = 0.03,
solver: str | str | Callable[[Callable, float, np.ndarray], np.ndarray] = "rk4",
):
- For
MackeyGlass
the type-annotation is only specifed asCallable
:
def __init__(
self,
a: float = 0.2,
b: float = 0.1,
c: int = 10,
tau: float = 23.0,
dt: float = 0.1,
solver: str | Callable = "rk4",
) -> None:
- For
SimplestDrivenChaotic
there is no type annotation forsolver
:
def __init__(self, omega: float = 1.88, dt: float = 0.1, solver="rk4") -> None:
"""Initialize the SimplestDrivenChaotic simulation object."""
super().__init__(dt, solver)
self.omega = omega