Skip to content

Glossary: Calculus for ML

np.trapezoid

Also written: trapezoid, np.trapz, trapz

A NumPy function that estimates an integral by joining points with straight lines and adding up the trapezoids. `np.trapz` is the old name, removed in NumPy 2.0.

Where the book teaches it

Related terms

Integral