laszukdawid / PyEMD

Python implementation of Empirical Mode Decompoisition (EMD) method
https://pyemd.readthedocs.io/
Apache License 2.0
860 stars 222 forks source link

Support for Numpy 2+ in EMD_matlab.py #163

Closed LeonardoLancia closed 1 week ago

LeonardoLancia commented 1 week ago

Describe the bug Same fixes operated on EMD.py should be extended to EMD_matlab.py

To Reproduce Substituting line 432 of EMD_matlab.py with: dtype = np.find_common_type([x.dtype, y.dtype], []) should do the job.

LeonardoLancia commented 1 week ago

there was a mistake the corrected line should be: dtype = np.promote_types(x.dtype, y.dtype)

laszukdawid commented 1 week ago

Thanks for letting me know! Updated in the latest, i.e. 1.6.2 version,

LeonardoLancia commented 1 week ago

Thanks for the fix, However, unfortunately now it raises a type error

File ~\AppData\Local\miniforge-pypy3\envs\modWorks\Lib\site-packages\PyEMD\EMD_matlab.py:433 in _common_dtype dtype = deduce_common_type([x.dtype, y.dtype], [])

TypeError: unhashable type: 'list'