自学内容网 自学内容网

Python的pywt库的安装

目录


pywt库的全称是PyWavelets, https://pywavelets.readthedocs.io/en/latest/

安装pywt库

pip install PyWavelets

而不是VS2017中默认的pip install pywt,真是坑啊

>>> import pywt

>>> x = [3, 7, 1, 1, -2, 5, 4, 6]

>>> cA, cD = pywt.dwt(x, ‘db2′)

>>> print cA

[ 5.65685425  7.39923721  0.22414387  3.33677403  7.77817459]

>>> print cD

[-2.44948974 -1.60368225 -4.44140056 -0.41361256  1.22474487]

>>> print pywt.idwt(cA, cD, ‘db2′)

[ 3.  7.  1.  1. -2.  5.  4.  6.]

原文地址:https://blog.csdn.net/weixin_46713695/article/details/143030066

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!