Workaround for int layers in Treshold
This commit is contained in:
parent
fb0a423015
commit
e84027a043
@ -26,6 +26,9 @@ class Treshold(Filter):
|
||||
# This filter each raster independently
|
||||
self.logger.info('Filtering')
|
||||
|
||||
# Workaround for int layers, as int cannot be nan
|
||||
data = data.astype(np.float64)
|
||||
|
||||
treshold_filter = data > self.treshold
|
||||
repeat_count = treshold_filter.sum(axis=(0, 1))
|
||||
data[treshold_filter] = np.nan
|
||||
|
Loading…
Reference in New Issue
Block a user