fCWT
fCWT copied to clipboard
Fix importing matplotlib whitch is not in pyproject.toml
matplotlib is not in dependencies at pyproject.toml.
But importing fCWT raises import error.
$ python -c "import fcwt"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/.../python3.12/site-packages/fcwt/__init__.py", line 2, in <module>
from .boilerplate import cwt, plot
File "/.../python3.12/site-packages/fcwt/boilerplate.py", line 3, in <module>
import matplotlib.pyplot as plt
ModuleNotFoundError: No module named 'matplotlib'
In this PR, I changed the location of matplotlib import from the top level to inside a function. This will ensure that matplotlib is imported only when plot is called.
resolved the conflict.