DuncDennis/lorenzpy

Wrong type-annotation for solver argument in simulation object initialization

Opened this issue · 0 comments

(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:

  1. For all autonomous flows, the type-annotation for the solver argument uses str 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",
    ):
  1. For MackeyGlass the type-annotation is only specifed as Callable:
    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:
  1. For SimplestDrivenChaotic there is no type annotation for solver:
    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