From 76c46a4b72ca9a305857014d97751a97338a8ce6 Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Sat, 2 Mar 2024 21:31:03 +0100 Subject: [PATCH] RandomGeoSampler: optional length is optional (#1907) --- torchgeo/samplers/single.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchgeo/samplers/single.py b/torchgeo/samplers/single.py index 7251f4b274f..360798b583d 100644 --- a/torchgeo/samplers/single.py +++ b/torchgeo/samplers/single.py @@ -70,7 +70,7 @@ def __init__( self, dataset: GeoDataset, size: Union[tuple[float, float], float], - length: Optional[int], + length: Optional[int] = None, roi: Optional[BoundingBox] = None, units: Units = Units.PIXELS, ) -> None: