Skip to content

Commit

Permalink
Add more lenient tolerance to Mobject.has_same_shape_as
Browse files Browse the repository at this point in the history
  • Loading branch information
3b1b committed Feb 4, 2023
1 parent fab917c commit 3bf9e40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion manimlib/mobject/mobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def has_same_shape_as(self, mobject: Mobject) -> bool:
)
if len(points1) != len(points2):
return False
return bool(np.isclose(points1, points2).all())
return bool(np.isclose(points1, points2, atol=self.get_width() * 1e-2).all())

# Creating new Mobjects from this one

Expand Down

0 comments on commit 3bf9e40

Please sign in to comment.