datashader
datashader copied to clipboard
Allow integer aggregate values of zero
For floating-point aggregate values, datashader uses NaN to indicate masked bins, i.e. bins with no data. Integers have no agreed-upon NaN value, and for now the interpolate and colorize methods of transfer_fn.py treat zero as the masked value. Similarly, for Boolean arrays, False is taken as the mask value, and only non-False bins are used.
For integer counts, zero does make a good mask value -- if there is no data for that cell (zero counts), mask it out. But for non-count integer-valued data, zero may have a specific interpretation other than "no data", and so it would be good to either allow users to specify a different mask value (perhaps -sys.maxsize?) or provide some other way to do masking.