From 3e460f33f70930c74e4b4819dc3302fd9102f9d1 Mon Sep 17 00:00:00 2001 From: Nicola Spanti Date: Thu, 23 Jul 2026 11:24:30 +0200 Subject: [PATCH] fix: allow `image_to_geotiff` to have its parameter `no_data` to be `None` - It is given to `rasterio.open` and its default value is `None`. - `Jupyter/Geocube-Client-DataAccess.ipynb` uses it with `None`. --- geocube/utils/image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geocube/utils/image.py b/geocube/utils/image.py index 93313ce..09de84d 100644 --- a/geocube/utils/image.py +++ b/geocube/utils/image.py @@ -27,7 +27,7 @@ def timeseries_to_animation(images: List[np.array], gif_name: str, duration=0.2, writer.append_data(image) -def image_to_geotiff(image: np.ndarray, transform: affine.Affine, projection: str, no_data: float, filename: str): +def image_to_geotiff(image: np.ndarray, transform: affine.Affine, projection: str, no_data: float | None, filename: str): import rasterio if len(image.shape) == 2: image = np.expand_dims(image, 0)