cannot merge Alpha (from colormap) and Mask with different type
vincentsarago opened this issue · 1 comments
vincentsarago commented
reported in stac-utils/titiler-pgstac#79
import numpy
mask = numpy.zeros((256,256), dtype="uint8")
alpha = numpy.zeros((256,256), dtype="float32")
numpy.bitwise_and(alpha, mask)
>> TypeError: ufunc 'bitwise_and' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
Line 488 in 0c9d4e5
Line 430 in 0c9d4e5
vincentsarago commented
after more 👀
It appears that the bug is in the mosaic methods
We shouldn't cast the mask to the data dtype