Skip to content

Commit c50d97f

Browse files
committed
Added comments regarding np.all in VMobject.consider_points_equals(_2d)
1 parent 276426d commit c50d97f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

manim/mobject/types/vectorized_mobject.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,6 +1055,7 @@ def consider_points_equals(
10551055

10561056
# Case 2: multiple pairs of points
10571057
is_close = abs(p1 - p0) <= atol
1058+
# This is actually more efficient than np.all(is_close, axis=1)
10581059
return is_close[:, 0] & is_close[:, 1] & is_close[:, 2]
10591060

10601061
def consider_points_equals_2d(
@@ -1095,6 +1096,7 @@ def consider_points_equals_2d(
10951096
p0 = p0.reshape(-1, self.dim)[:, :2]
10961097
p1 = p1.reshape(-1, self.dim)[:, :2]
10971098
is_close = abs(p1 - p0) <= atol
1099+
# This is actually more efficient than np.all(is_close, axis=1)
10981100
return is_close[:, 0] & is_close[:, 1]
10991101

11001102
# Information about line

0 commit comments

Comments
 (0)