semantique.processor.utils.get_null

Contents

semantique.processor.utils.get_null#

semantique.processor.utils.get_null(x)[source]#

Return the appropriate nodata value for an array.

For arrays of numbers NaN (i.e. not a number) is returned. For arrays of datetime values NaT (not a time) is returned. For other arrays None is returned.

Parameters:

x (xarray.DataArray or numpy.array) – The input array.