def _nodata(dtype): if np.issubdtype(dtype, float): return np.finfo(dtype).min else: return np.iinfo(dtype).min