Please note that these are just the code examples accompanying the book, which we uploaded for your convenience; be aware that these notebooks may not be useful without the formulae and descriptive ...
Suggested fixes include replacing np.trapz with scipy.integrate.trapezoid, providing an internal fallback implementation if SciPy is not available, or explicitly restricting NumPy to <2.4.0 with a ...