OverLordGoldDragon / ssqueezepy

Synchrosqueezing, wavelet transforms, and time-frequency analysis in Python
MIT License
599 stars 92 forks source link

TypeError: expected dtype object, got 'numpy.dtype[float32]' #106

Closed EnriqueGautoSand closed 2 days ago

EnriqueGautoSand commented 1 month ago

Description

i got this error TypeError: expected dtype object, got 'numpy.dtype[float32]' at this line wavelet = Wavelet('morlet')

Code for reproduction

import numpy as np
from ssqueezepy import Wavelet, cwt, icwt

np.random.seed(0)
x = np.random.randn(2048)
wavelet = Wavelet('morlet')

Wx, scales = cwt(x, wavelet)
xrec = icwt(Wx, wavelet, scales)

print("Mean Squared Error: %.3g" % np.mean(np.abs(x - xrec)**2))
OverLordGoldDragon commented 2 days ago

I couldn't reproduce this. Are you using the latest ssqueezepy?

import ssqueezepy
print(ssqueezepy.__version__)
0.6.5
OverLordGoldDragon commented 2 days ago

This shouldn't be happening; please double-check the installation. Feel free to re-open, but with the full error trace included.