I'm trying to import EMD from the PyEMD package. But I'm facing a peculiar issue.
When I write everything in small-case i.e. "emd" & "pyemd", it works but as per the desired case i.e. "EMD" & "PyEMD", it doesn't work.
!pip install pyemd
from pyemd import emd
#Output:
Requirement already satisfied: pyemd in /anaconda/envs/azureml_py38/lib/python3.8/site-packages (0.5.1)
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in /anaconda/envs/azureml_py38/lib/python3.8/site-packages (from pyemd) (1.23.3)
!pip install PyEMD
from PyEMD import EMD
#Output:
Requirement already satisfied: PyEMD in /anaconda/envs/azureml_py38/lib/python3.8/site-packages (0.5.1)
Requirement already satisfied: numpy<2.0.0,>=1.9.0 in /anaconda/envs/azureml_py38/lib/python3.8/site-packages (from PyEMD) (1.23.3)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Input In [9], in <cell line: 2>()
1 get_ipython().system('pip install PyEMD')
----> 2 from PyEMD import EMD
ModuleNotFoundError: No module named 'PyEMD'
The problem is that both these functions "emd" and "EMD" expect different kinds of input arguments, hence they aren't the same function. I require only "EMD" for my use.
So, how exactly do we import EMD from PyEMD?
CodePudding user response:
It looks like you're mixing two different packages presumably both offering related capabilities.
pip install pyemd
installs pyemb
: https://pypi.org/project/pyemd/ by WMayner: https://github.com/wmayner/pyemd
For EMD
like you want, you probably need pip install EMD-signal
to get the package by Dawid Laszuk: https://pyemd.readthedocs.io/en/latest/intro.html https://github.com/laszukdawid/PyEMD