Python的pywt库的安装

论坛 期权论坛 脚本     
匿名技术用户   2021-1-5 11:02   11   0

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

安装pywt库:

pip install PyWavelets (https://pywavelets.readthedocs.io/en/latest/install.html

而不是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.]

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:7942463
帖子:1588486
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP