Commit 7caabd09 authored by benjaminpillot's avatar benjaminpillot
Browse files

When no_data is None return np.nan

parent f26f5899
......@@ -7,6 +7,7 @@ More detailed description.
import multiprocessing as mp
import numpy as np
import ogr
import pyproj
from pyrasta.io_.files import _copy_to_file
......@@ -709,7 +710,12 @@ class RasterBase:
def no_data(self):
return self._gdal_dataset.GetRasterBand(1).GetNoDataValue()
no_data = self._gdal_dataset.GetRasterBand(1).GetNoDataValue()
if no_data is None:
return np.nan
return no_data
# return self._gdal_dataset.GetRasterBand(1).GetNoDataValue()
def data_type(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment