-
Notifications
You must be signed in to change notification settings - Fork 20
Description
Describe the bug
Thanks for such a great package!
I am using Python 3.12.0 with scipy 1.15.2, PySDKit 0.4.17, and numpy 2.1.3. Python running on Ubuntu 22.04
When I run the ITD method on my dataset, I get the following error message:
LK1 (48,) vs LK2 (48,)
[-1.20752663e-02 -1.09578711e-02 -9.88145499e-03 ... -1.11700587e+03
-1.11700565e+03 -5.40769799e-03]
LK1 (14,) vs LK2 (12,)
Traceback (most recent call last):
File "", line 1, in
File "/home/ivan_phd/python/python-3.12.0/lib/python3.12/site-packages/pysdkit/_itd/itd.py", line 140, in fit_transform
L1, H1 = self.itd_baseline_extract(signal)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ivan_phd/python/python-3.12.0/lib/python3.12/site-packages/pysdkit/_itd/itd.py", line 109, in itd_baseline_extract
LK = np.vstack((LK1, LK2)).T
^^^^^^^^^^^^^^^^^^^^^
File "/home/ivan_phd/python/python-3.12.0/lib/python3.12/site-packages/numpy/_core/shape_base.py", line 291, in vstack
return _nx.concatenate(arrs, 0, dtype=dtype, casting=casting)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: all the input array dimensions except for the concatenation axis must match exactly, but along dimension 1, the array at index 0 has size 14 and the array at index 1 has size 12
I attached to this ticket, the data used to reproduce the encountered issue.
Thanks for your help
Ivan
To Reproduce
import numpy as np
from pysdkit import ITD
trace= np.load('trace.npy')
itd_gral= ITD(N_max= 3)
imf_gral= itd_gral.fit_transform(trace)
Expected behavior
I expect the ITD method to generate 3 decompositions per analyzed signal