diff --git a/eolearn/ml_tools/extra/__init__.py b/eolearn/ml_tools/extra/__init__.py deleted file mode 100644 index a08d1524e..000000000 --- a/eolearn/ml_tools/extra/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -A subfolder containing integrations with other packages -""" diff --git a/eolearn/ml_tools/extra/plotting.py b/eolearn/visualization/utils.py similarity index 85% rename from eolearn/ml_tools/extra/plotting.py rename to eolearn/visualization/utils.py index 9033278e3..176d39f5c 100644 --- a/eolearn/ml_tools/extra/plotting.py +++ b/eolearn/visualization/utils.py @@ -1,5 +1,5 @@ """ -The module provides some utility functions for ML specific plotting +The module provides some utility functions for plotting Copyright (c) 2017- Sinergise and contributors For the full list of contributors, see the CREDITS file in the root directory of this source tree. @@ -11,13 +11,9 @@ import itertools +import matplotlib.pyplot as plt import numpy as np - -try: - import matplotlib.pyplot as plt - from matplotlib.colors import Colormap -except ImportError as exception: - raise ImportError("This module requires an installation of matplotlib package") from exception +from matplotlib.colors import Colormap def plot_confusion_matrix( diff --git a/pyproject.toml b/pyproject.toml index ed75afa92..f3aeb34a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,6 @@ io = ["affine", "fiona>=1.8.18", "rasterio>=1.2.7, <1.3.8"] mask = ["opencv-python-headless"] mask_extra = ["s2cloudless"] mltools = ["shapely"] -mltoolsplotting = ["matplotlib"] visualization = ["graphviz>=0.10.1", "jinja2", "matplotlib", "pygments"] docs = [ "eo-learn[ALL]",