Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Remove deprecation warning from pytest np.trapz -> np.trapezoid (#4513)

Henrik Skov Midtiby976d6346567c
diff --git a/manim/utils/space_ops.py b/manim/utils/space_ops.py
index 21ae9400e..2e37c729f 100644
--- a/manim/utils/space_ops.py
+++ b/manim/utils/space_ops.py
@@ -658,7 +658,7 @@ def shoelace(x_y: Point2D_Array) -> float:
"""
x = x_y[:, 0]
y = x_y[:, 1]
- val: float = np.trapz(y, x)
+ val: float = np.trapezoid(y, x)
return val