From 635b383514045c5171fa1923330409b5baccdbab Mon Sep 17 00:00:00 2001 From: David Meaux Date: Wed, 17 Jan 2024 12:04:49 +0100 Subject: [PATCH] removed integer images from documentation --- docs/tutorials/custom_raster_dataset.ipynb | 2 +- torchgeo/datasets/geo.py | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/tutorials/custom_raster_dataset.ipynb b/docs/tutorials/custom_raster_dataset.ipynb index a1e9541f63e..3a5feb10845 100644 --- a/docs/tutorials/custom_raster_dataset.ipynb +++ b/docs/tutorials/custom_raster_dataset.ipynb @@ -333,7 +333,7 @@ "\n", "### `dtype`\n", "\n", - "Defaults to float32 for `is_image == True` and long for `is_image == False`. This is what is usually wanted for 99% of datasets but can be overridden for integer images (like some Digital Elevation Models) or pixel-wise regression masks (where the target should be float32). Uint16 and uint32 are automatically cast to int32 and int64, respectively, because numpy supports the former but torch does not.\n", + "Defaults to float32 for `is_image == True` and long for `is_image == False`. This is what is usually wanted for 99% of datasets but can be overridden for pixel-wise regression masks (where the target should be float32). Uint16 and uint32 are automatically cast to int32 and int64, respectively, because numpy supports the former but torch does not.\n", "\n", "### `separate_files`\n", "\n", diff --git a/torchgeo/datasets/geo.py b/torchgeo/datasets/geo.py index 63c13bc6dd8..90e4c042a3a 100644 --- a/torchgeo/datasets/geo.py +++ b/torchgeo/datasets/geo.py @@ -370,11 +370,10 @@ def dtype(self) -> torch.dtype: """The dtype of the dataset (overrides the dtype of the data file via a cast). Defaults to float32 for is_image = True and long for is_image = False. This is - what we usually want for 99% of datasets but can be overridden for integer - images (like some imagery or Digital Elevation Models) or pixel-wise regression - masks (where it should be float32). Uint16 and uint32 are automatically cast to - int32 and int64, respectively, because numpy supports the former but torch does - not. + what we usually want for 99% of datasets but can be overridden for pixel-wise + regression masks (where it should be float32). Uint16 and uint32 are + automatically cast to int32 and int64, respectively, because numpy supports + the former but torch does not. Returns: the dtype of the dataset