diff --git a/requirements/required.txt b/requirements/required.txt index 288fc286918..9e9074a826a 100644 --- a/requirements/required.txt +++ b/requirements/required.txt @@ -8,7 +8,7 @@ kornia==0.7.4 lightly==1.5.15 lightning[pytorch-extra]==2.4.0 matplotlib==3.9.3 -numpy==2.1.3 +numpy==2.2.0 pandas==2.2.3 pillow==11.0.0 pyproj==3.7.0 diff --git a/torchgeo/datasets/chesapeake.py b/torchgeo/datasets/chesapeake.py index 8843fd9ad86..459d096043c 100644 --- a/torchgeo/datasets/chesapeake.py +++ b/torchgeo/datasets/chesapeake.py @@ -476,13 +476,11 @@ def __init__( lc_colors = np.zeros((max(self.lc_cmap.keys()) + 1, 4)) lc_colors[list(self.lc_cmap.keys())] = list(self.lc_cmap.values()) - lc_colors = lc_colors[:, :3] / 255 - self._lc_cmap = ListedColormap(lc_colors) + self._lc_cmap = ListedColormap(lc_colors[:, :3] / 255) nlcd_colors = np.zeros((max(NLCD.cmap.keys()) + 1, 4)) nlcd_colors[list(NLCD.cmap.keys())] = list(NLCD.cmap.values()) - nlcd_colors = nlcd_colors[:, :3] / 255 - self._nlcd_cmap = ListedColormap(nlcd_colors) + self._nlcd_cmap = ListedColormap(nlcd_colors[:, :3] / 255) # Add all tiles into the index in epsg:3857 based on the included geojson mint: float = 0 diff --git a/torchgeo/datasets/landcoverai.py b/torchgeo/datasets/landcoverai.py index e0ff04755bf..d2c0acf88e7 100644 --- a/torchgeo/datasets/landcoverai.py +++ b/torchgeo/datasets/landcoverai.py @@ -95,8 +95,7 @@ def __init__( lc_colors = np.zeros((max(self.cmap.keys()) + 1, 4)) lc_colors[list(self.cmap.keys())] = list(self.cmap.values()) - lc_colors = lc_colors[:, :3] / 255 - self._lc_cmap = ListedColormap(lc_colors) + self._lc_cmap = ListedColormap(lc_colors[:, :3] / 255) self._verify()