Closed mplough-kobold closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.24%. Comparing base (
6af5d0c
) to head (2199d68
). Report is 10 commits behind head on develop.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
When the
save_cog_with_dask
function computed statistics on a float32 band that included NaN values and had a nodata value of NaN, the minimum and maximum values were incorrectly computed as NaN.When the
save_cog_with_dask
function computed statistics on a float32 band that included NaN values and had a finite nodata value, the NaN values were included in the statistics computation. Although the correct behavior here is debatable, the best thing to do is to match GDAL and GDAL excludes the NaN values.This PR updates NaN value handling in statistics computations and adds test coverage to verify how things are handled.
Note that
dask.array
'snanmin
,nanmax
, etc. methods are equivalent tomin
,max
, etc. when used with integer data.