@@ -96,13 +96,13 @@ def __init__(
9696 self .y_length = y_length
9797 self .num_sampled_graph_points_per_tick = 10
9898
99- def coords_to_point (self , * coords ):
99+ def coords_to_point (self , * coords : Union [ float , int , Sequence [ float ]] ):
100100 raise NotImplementedError ()
101101
102102 def point_to_coords (self , point ):
103103 raise NotImplementedError ()
104104
105- def c2p (self , * coords ):
105+ def c2p (self , * coords : Union [ float , int , Sequence [ float ]] ):
106106 """Abbreviation for coords_to_point"""
107107 return self .coords_to_point (* coords )
108108
@@ -1080,7 +1080,9 @@ def create_axis(
10801080 axis .shift (- axis .number_to_point (self .origin_shift (range_terms )))
10811081 return axis
10821082
1083- def coords_to_point (self , * coords : Sequence [float ]) -> np .ndarray :
1083+ def coords_to_point (
1084+ self , * coords : Union [float , int , Sequence [float ]]
1085+ ) -> np .ndarray :
10841086 """Transforms the vector formed from ``coords`` formed by the :class:`Axes`
10851087 into the corresponding vector with respect to the default basis.
10861088
@@ -1090,6 +1092,7 @@ def coords_to_point(self, *coords: Sequence[float]) -> np.ndarray:
10901092 A point that results from a change of basis from the coordinate system
10911093 defined by the :class:`Axes` to that of ``manim``'s default coordinate system
10921094 """
1095+ coords = np .array (coords ).flatten ()
10931096 origin = self .x_axis .number_to_point (self .origin_shift (self .x_range ))
10941097 result = np .array (origin )
10951098 for axis , coord in zip (self .get_axes (), coords ):
0 commit comments