Skip to content

Commit 5b6f3aa

Browse files
committed
workaround for negative zero in doctests
1 parent 76a175d commit 5b6f3aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

manim/mobject/geometry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -932,7 +932,7 @@ def base(self):
932932
--------
933933
::
934934
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 0, 0]), buff=0)
935-
>>> arrow.tip.base.round(2)
935+
>>> arrow.tip.base.round(2) + 0. # add 0. to avoid negative 0 in output
936936
array([1.65, 0. , 0. ])
937937
938938
"""
@@ -946,7 +946,7 @@ def tip_point(self):
946946
--------
947947
::
948948
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 0, 0]), buff=0)
949-
>>> arrow.tip.tip_point.round(2)
949+
>>> arrow.tip.tip_point.round(2) + 0.
950950
array([2., 0., 0.])
951951
952952
"""
@@ -960,7 +960,7 @@ def vector(self):
960960
--------
961961
::
962962
>>> arrow = Arrow(np.array([0, 0, 0]), np.array([2, 2, 0]), buff=0)
963-
>>> arrow.tip.vector.round(2)
963+
>>> arrow.tip.vector.round(2) + 0.
964964
array([0.25, 0.25, 0. ])
965965
966966
"""

0 commit comments

Comments
 (0)