SciPy
- Use `scipy.sparse` for large sparse matrices — avoid converting to dense. Use `scipy.optimize.minimize` with explicit method and bounds. Use `scipy.stats` distributions with `.fit()` for parameter estimation.
SciPy
- Use `scipy.sparse` for large sparse matrices — avoid converting to dense. Use `scipy.optimize.minimize` with explicit method and bounds. Use `scipy.stats` distributions with `.fit()` for parameter estimation.
- Use `scipy.interpolate.interp1d` or `RegularGridInterpolator` instead of manual interpolation. Use `scipy.signal` for filtering — apply `filtfilt` for zero-phase filtering. Use `scipy.linalg` over `numpy.linalg` for better performance and more functions. Choose the right `scipy.integrate` method: `quad` for 1D, `dblquad` for 2D, `solve_ivp` for ODEs.