ds.rst.to_nanarray() or Raster.to_nanarray()

ds.rst.to_nanarray() or Raster.to_nanarray()#

RasterBase.to_nanarray(floating_dtype='float32', *, return_mask=False)[source]#

Get NaN array from the raster.

Overloads:

Optionally, return the mask from the masked array.

Parameters:
  • floating_dtype (DTypeLike) – Floating dtype to convert to, if masked array is not of floating type.

  • return_mask (bool) – Whether to return the mask of valid data.

:returns Array with masked data as NaNs, (Optional) Mask of invalid data.