laszukdawid / PyEMD

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

module object is not callable #137

Closed reinforcement-learning-experiments closed 1 year ago

reinforcement-learning-experiments commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Short code showing how to reproduce the issue.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Running environment Provide operating system (OS) information, PyEMD version and describe virtual environment (if any).

Additional context Add any other context about the problem here.

reinforcement-learning-experiments commented 1 year ago

An example from your site: https://pyemd.readthedocs.io/en/latest/examples.html

image

Anaconda3: pyemd 0.5.1 py39h2e25243_1004 conda-forge

IDE: DataSpell 2022.3.2

Error: TypeError: 'module' object is not callable Please see screenshot

ranlychan commented 1 year ago

Because the module "EMD" and the class you were trying to use share the same name. So you could try to replace emd = EMD() at line 6 with emd = EMD.EMD(). It works in my environment. image

reinforcement-learning-experiments commented 1 year ago

@ranlychan you are right. Thanks! This error needs to be changed on the page: https://pyemd.readthedocs.io/en/latest/examples.html

laszukdawid commented 1 year ago

You aren't using this PyEMD (which is EMD-signal). For this PyEMD the code is working image