Skip to content

Commit

Permalink
Reverting
Browse files Browse the repository at this point in the history
  • Loading branch information
calebrob6 committed Mar 22, 2023
1 parent ce19188 commit 7e78884
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions tests/datasets/test_geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,7 @@ def sentinel(self, request: SubRequest) -> Sentinel2:
@pytest.fixture()
def custom_dtype_ds(self) -> RasterDataset:
root = os.path.join("tests", "data", "raster")
ds = RasterDataset(root)
ds.dtype = torch.long
return ds
return RasterDataset(root)

def test_getitem_single_file(self, naip: NAIP) -> None:
x = naip[naip.bounds]
Expand Down
2 changes: 1 addition & 1 deletion torchgeo/datasets/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def __getitem__(self, query: BoundingBox) -> Dict[str, Any]:
data = data.to(self.dtype)

if self.is_image:
sample["image"] = data
sample["image"] = data.float()
else:
sample["mask"] = data

Expand Down

0 comments on commit 7e78884

Please sign in to comment.