TL;DR: scipy 1.14 removed the old trapz name; it is now called trapezoid. Change your import to `from scipy.integrate import trapezoid` (alias it as trapz if you like) or pin scipy below 1.14.

## The error
```text
ImportError: cannot import name 'trapz' from 'scipy.integrate'
```

## Fix it
1. Update the import (keeps working on old scipy too if you alias):
   ```python
   from scipy.integrate import trapezoid as trapz
   ```
   Expected: existing trapz(...) call sites keep working.
2. Or use the new name directly:
   ```python
   from scipy.integrate import trapezoid
   ```
3. Verify:
   ```
   python -c "from scipy.integrate import trapezoid; print(trapez([1,2,3]))"
   ```
   Expected: prints 4.0.
4. Stopgap if you cannot edit the code: `pip install "scipy<1.14"`. Expected: old import works again.

## When this applies
Use this when code written for older scipy does `from scipy.integrate import trapz` on scipy 1.14+.

## When it does not apply
If the error names cumtrapz, its new name is cumulative_trapezoid. If scipy itself fails to import, reinstall scipy.

## Compatibility
scipy 1.14+. trapezoid exists since scipy 1.6, so the aliased import works on scipy 1.6 through 2.x.

## Root cause
scipy renamed trapz to trapezoid for a clearer API and kept trapz as a deprecated alias for years before removing it in 1.14. Code that never migrated breaks at import.

## Edge cases
The sibling cumtrapz was renamed cumulative_trapezoid in the same cleanup; check for it in the same files. Libraries should use the try/except import pattern to support both eras.