{"library":"pywavelets","title":"PyWavelets","description":"PyWavelets is a free, open-source Python library for wavelet transforms. It provides 1D, 2D, and nD forward and inverse Discrete Wavelet Transforms (DWT and IDWT), Stationary Wavelet Transforms (SWT), Wavelet Packet decomposition, and Continuous Wavelet Transforms (CWT). It combines a simple high-level interface with low-level C and Cython performance and is widely used in signal processing, image compression, and noise removal. The current version is 1.9.0 and it has an active release cadence, with minor updates and new features being released regularly.","status":"active","version":"1.9.0","language":"en","source_language":"en","source_url":"https://github.com/PyWavelets/pywt","tags":["signal processing","wavelets","DWT","CWT","image processing","scientific computing","numpy"],"install":[{"cmd":"pip install PyWavelets","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for numerical array operations. PyWavelets 1.9.0 requires NumPy >= 1.25.0.","package":"numpy","optional":false},{"reason":"Optional dependency, required for running tests and many examples involving plotting.","package":"matplotlib","optional":true}],"imports":[{"symbol":"pywt","correct":"import pywt"}],"quickstart":{"code":"import pywt\nimport numpy as np\n\ndata = np.array([1, 2, 3, 4, 5, 6])\nwavelet = 'db1'\n\n# Perform a single-level Discrete Wavelet Transform (DWT)\ncA, cD = pywt.dwt(data, wavelet)\n\nprint(f\"Original data: {data}\")\nprint(f\"Approximation coefficients (cA): {cA}\")\nprint(f\"Detail coefficients (cD): {cD}\")\n\n# Perform inverse DWT to reconstruct the signal\nreconstructed_data = pywt.idwt(cA, cD, wavelet)\nprint(f\"Reconstructed data: {reconstructed_data}\")","lang":"python","description":"This quickstart demonstrates a basic 1D Discrete Wavelet Transform (DWT) and its inverse using the 'db1' (Daubechies 1) wavelet. It shows how to decompose a signal into approximation (cA) and detail (cD) coefficients, and then reconstruct the original signal."},"warnings":[{"fix":"Upgrade Python to 3.11 or newer, or downgrade PyWavelets to a compatible version if unable to upgrade Python.","message":"PyWavelets 1.9.0 dropped support for Python 3.10 and added support for Python 3.14. Ensure your Python environment meets the minimum requirement of Python >=3.11.","severity":"breaking","affected_versions":"1.9.0+"},{"fix":"Update NumPy to version 1.25.0 or higher using `pip install --upgrade numpy`.","message":"The minimum supported NumPy version has been updated. PyWavelets 1.9.0 explicitly requires NumPy >= 1.25.0. Using an older NumPy version will likely lead to installation or runtime errors.","severity":"breaking","affected_versions":"1.9.0+"},{"fix":"Manually install `scipy` (e.g., `pip install scipy`) if your application or specific PyWavelets functions (like certain CWT functionalities) require it.","message":"The optional dependency on SciPy for FFT operations was removed in PyWavelets 1.9.0. If your application implicitly relied on SciPy being available due to PyWavelets, it might now be missing.","severity":"breaking","affected_versions":"1.9.0+"},{"fix":"For commercial use, the new image is safe. If the original image is critical for non-commercial use, you must source it externally or use an older PyWavelets version.","message":"The image returned by `pywt.data.camera` was replaced in version 1.2.0 with a new CC0-licensed image due to licensing restrictions on the original 'cameraman' image. If your application relies on the exact pixel data of the original image, it will be different in newer versions.","severity":"gotcha","affected_versions":"1.2.0+"},{"fix":"Always explicitly specify the `mode` parameter (e.g., `mode='symmetric'`) and consult the documentation or `pywt.dwt_coeff_len()` to predict output sizes, especially when chaining transforms or performing inverse transforms.","message":"The length of coefficient arrays returned by `pywt.dwt` depends on the chosen signal extension `mode`. For all modes except 'periodization' ('per'), `len(cA) == len(cD) == floor((len(data) + wavelet.dec_len - 1) / 2)`. For 'periodization' mode, `len(cA) == len(cD) == ceil(len(data) / 2)`. This can lead to unexpected output sizes.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-05T00:00:00.000Z","next_check":"2026-07-04T00:00:00.000Z"}