mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Add check for invalid entries to Mobject.set_points
This commit is contained in:
parent
26ff1a9716
commit
3f024175d4
1 changed files with 3 additions and 1 deletions
|
@ -181,8 +181,10 @@ class Mobject(object):
|
|||
self.data["points"][:] = points
|
||||
elif isinstance(points, np.ndarray):
|
||||
self.data["points"] = points.copy()
|
||||
else:
|
||||
elif isinstance(points, list):
|
||||
self.data["points"] = np.array(points)
|
||||
else:
|
||||
raise Exception(f"Invalid type {type(points)} for points")
|
||||
self.refresh_bounding_box()
|
||||
return self
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue