We weren't asking rasterio for arrays of the output dtype, so we'd just get whatever the native dtype was of the GeoTIFF. If the GeoTIFF was an integer dtype, but specified floating-point scale/offset, then applying the scaling would fail. This basically moves the cast-to-output-dtype before applying scaling, so whatever you pass for dtype= (float64 by default) will actually control it.
We weren't asking rasterio for arrays of the output dtype, so we'd just get whatever the native dtype was of the GeoTIFF. If the GeoTIFF was an integer dtype, but specified floating-point scale/offset, then applying the scaling would fail. This basically moves the cast-to-output-dtype before applying scaling, so whatever you pass for
dtype=
(float64 by default) will actually control it.Closes https://github.com/gjoseph92/stackstac/issues/206