Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Add zero to remove negative zeros (#4332)

Mohamed El Shorbagy9e74ee7edf71
diff --git a/manim/animation/transform_matching_parts.py b/manim/animation/transform_matching_parts.py
index 9535c4a3b..03305201f 100644
--- a/manim/animation/transform_matching_parts.py
+++ b/manim/animation/transform_matching_parts.py
@@ -225,7 +225,8 @@ class TransformMatchingShapes(TransformMatchingAbstractBase):
mobject.save_state()
mobject.center()
mobject.set(height=1)
- result = hash(np.round(mobject.points, 3).tobytes())
+ rounded_points = np.round(mobject.points, 3) + 0.0
+ result = hash(rounded_points.tobytes())
mobject.restore()
return result