Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong type-annotation for solver argument in simulation object initialization #5

Open
DuncDennis opened this issue Oct 21, 2023 · 0 comments
Labels
type annotations Bugs regarding type annotations.

Comments

@DuncDennis
Copy link
Owner

(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
@DuncDennis DuncDennis added the type annotations Bugs regarding type annotations. label Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type annotations Bugs regarding type annotations.
Projects
None yet
Development

No branches or pull requests

1 participant