`get_array_statistics` fails when data is fully masked
vincentsarago opened this issue · 2 comments
vincentsarago commented
First reported in NASA-IMPACT/veda-data-pipelines#350
import numpy
from rio_tiler.utils import get_array_statistics
arr = numpy.ma.array(numpy.zeros((1,256,256)))
arr.mask = True
get_array_statistics(arr)
IndexError: cannot do a non-empty take from an empty axes
We will fix this in rio-tiler v4 and V5
vincentsarago commented
🤦 this was already fixed in 5.0 https://github.com/cogeotiff/rio-tiler/blob/main/rio_tiler/utils.py#L117-L122
vincentsarago commented
closed in #618