From 336723201e7f6c33f59a285624d5edb055622d0e Mon Sep 17 00:00:00 2001 From: Andrew Annex Date: Tue, 7 Feb 2023 08:42:08 -0800 Subject: [PATCH] cast to float just in case --- planetcantile/topoalgo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/planetcantile/topoalgo.py b/planetcantile/topoalgo.py index 4980a2df..b5d8e523 100644 --- a/planetcantile/topoalgo.py +++ b/planetcantile/topoalgo.py @@ -60,7 +60,7 @@ class TopographyQuantizer(BaseAlgorithm): def __call__(self, img: ImageData) -> ImageData: """Encode DEM into RGB""" quantizer = quantizers.get(self.body, "anyrock") - z = img.data[0] + z = img.data[0].astype(float) z -= quantizer["min"] z /= quantizer["resolution"] d_z = z / 256