manim
manim copied to clipboard
ParametricFunction: wrong type hint
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...
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.