You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Compatibility Issue] np.trapz removed in NumPy 2.4.0 — use np.trapezoid instead #28940
numpy.trapz was deprecated in NumPy 2.0 (2023-08-18) and fully removed in NumPy 2.4.0 (2025-12-20). In NumPy >= 2.4.0, any call to np.trapz() raises:
AttributeError: module 'numpy' has no attribute 'trapz'
Ivy defines its own trapz API across multiple backends (torch, jax, tensorflow, numpy). The numpy backend directly delegates to np.trapz, which will break.
Impact
Severity: High — hard crash at runtime on NumPy >= 2.4.0
The numpy backend trapz() is called via ivy.trapz() → backend dispatch → np.trapz()
Also affects the numpy frontend: ivy.functional.frontends.numpy.trapz() → ivy.trapz() → numpy backend → np.trapz()
The experimental igamma_cal function in statistical.py is also affected
Activity