Skip to content

Commit

Permalink
Bump numpy from 2.1.3 to 2.2.0 in /requirements (#2465)
Browse files Browse the repository at this point in the history
* Bump numpy from 2.1.3 to 2.2.0 in /requirements

Bumps [numpy](https://github.com/numpy/numpy) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](numpy/numpy@v2.1.3...v2.2.0)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* Ensure that array dtype is static

* Workaround for typing bug

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Adam J. Stewart <[email protected]>
  • Loading branch information
dependabot[bot] and adamjstewart authored Dec 10, 2024
1 parent f80f62a commit ff3d087
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion requirements/required.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions torchgeo/datasets/chesapeake.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions torchgeo/datasets/landcoverai.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit ff3d087

Please sign in to comment.