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

ParametricFunction: wrong type hint #3917

Closed
uwezi opened this issue Aug 26, 2024 · 1 comment · Fixed by #3926
Closed

ParametricFunction: wrong type hint #3917

uwezi opened this issue Aug 26, 2024 · 1 comment · Fixed by #3926

Comments

@uwezi
Copy link
Contributor

uwezi commented Aug 26, 2024

Description of bug / unexpected behavior

nothing really critical, but perhaps someone could just quickly change this

functions.py line 105

class ParametricFunction(VMobject, metaclass=ConvertToOpenGL):
    def __init__(
        self,
        function: Callable[[float], Point3D],
        t_range: Point2D | Point3D = (0, 1),
        scaling: _ScaleBase = LinearBase(),
        dt: float = 1e-8,
        discontinuities: Iterable[float] | None = None,
        use_smoothing: bool = True,
        use_vectorized: bool = False,
        **kwargs,
    ):

Giving a 2D/3D point as a type hint for the t_range just seems weird...

@JasonGrace2282
Copy link
Member

I agree the name is misleading - however, it is technically correct as a numpy array of the right shape should also work.
Despite that, I agree it's worth changing the typehint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

4 participants
@uwezi @JasonGrace2282 and others