Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Added typing for inputs as float

Alex Lembcke14e777e3c870
diff --git a/manim/mobject/coordinate_systems.py b/manim/mobject/coordinate_systems.py
index b7448c95c..2d5866793 100644
--- a/manim/mobject/coordinate_systems.py
+++ b/manim/mobject/coordinate_systems.py
@@ -5,7 +5,7 @@ __all__ = ["CoordinateSystem", "Axes", "ThreeDAxes", "NumberPlane", "ComplexPlan
import math
import numbers
-from typing import Iterable, Optional
+from typing import Iterable, Optional, List
import numpy as np
@@ -362,13 +362,13 @@ class Axes(VGroup, CoordinateSystem):
return line_graph
- def origin_shift(self, axis_range):
+ def origin_shift(self, axis_range: List[float]):
"""Shifts graph mobjects to compensate when 0 is not on the axis.
Parameters
----------
- axis_range : Union[:class:`list`, :class:`numpy.ndarray`]
- The range of the axis : `(x_min, x_max, x_step)`.
+ axis_range
+ The range of the axis : ``(x_min, x_max, x_step)``.
"""
if axis_range[0] > 0:
return axis_range[0]