Skip to content
Snippets Groups Projects
Commit 683fe386 authored by Sebastian Müller's avatar Sebastian Müller 🐈
Browse files

masking: pylint fix

parent bd1dc860
No related branches found
No related tags found
1 merge request!260Masked array support
......@@ -65,9 +65,13 @@ class Masking(Adapter):
# info coming from output, set grid None to get the input grid
request = info.copy_with(grid=None, missing_value=None)
in_info = self.exchange_info(request)
# get missing value from cf-convention meta data (in/out can differ here)
out_nodata = info.meta.get("missing_value", None)
in_nodata = in_info.meta.get("missing_value", None)
# check no-data value
if self.nodata is None:
# get missing value from cf-convention meta data (in/out can differ here)
self.nodata = info.meta.get(
"missing_value", in_info.meta.get("missing_value", None)
)
if info.grid is None:
with ErrorLogger(self.logger):
......@@ -87,10 +91,6 @@ class Masking(Adapter):
self._sup_grid = in_info.grid
self._sub_grid = info.grid
# check no-data value
if self.nodata is None:
self.nodata = out_nodata if out_nodata is not None else in_nodata
# create_selection
if self._sub_grid.mask is not None:
self._canonical_mask = self._sub_grid.to_canonical(self._sub_grid.mask)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment