Commit 472f5f32 authored by Benjamin Jakimow's avatar Benjamin Jakimow
Browse files

removed np.float deprectation warning


fixed bug in temporal profile loading
Signed-off-by: Benjamin Jakimow's avatarBenjamin Jakimow benjamin.jakimow@geo.hu-berlin.de <benjamin.jakimow@geo.hu-berlin.de>
parent 1a49a2fb
Pipeline #17144 failed with stage
in 1 minute
......@@ -313,7 +313,7 @@ class TemporalProfilePlotDataItem(pg.PlotDataItem):
# handle failed removal of NaN
# see https://github.com/pyqtgraph/pyqtgraph/issues/1057
if not isinstance(y, np.ndarray):
y = np.asarray(y, dtype=np.float)
y = np.asarray(y, dtype=float)
if not isinstance(x, np.ndarray):
x = np.asarray(x)
......
......@@ -1094,7 +1094,7 @@ class TemporalProfileLoaderTask(QgsTask):
for tp in required_profiles:
assert isinstance(tp, TemporalProfile)
self.GEOMETRY_CACHE[tp.id()] = dict()
missingTPData = dict()
missingTPData: typing.Dict[TimeSeriesDate] = dict()
for sensor, tsds in required_tsds.items():
for tsd in timeSeries.tsds(sensor=sensor):
existingTSDData: dict = tp.data(tsd)
......@@ -1220,7 +1220,11 @@ class TemporalProfileLoaderTask(QgsTask):
value = np.nanmean(block)
del block
if np.isfinite(value):
self.MISSING_DATA[tpID][tsd][band_key] = value
tpData = self.MISSING_DATA.get(tpID, {})
tsdData = tpData.get(tsd, {})
tsdData[band_key] = value
tpData[tsd] = tsdData
self.MISSING_DATA[tpID] = tpData
del band
del required_band_profiles
......
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