From 4693f134686455734b00b583d6cab47f698787ec Mon Sep 17 00:00:00 2001 From: Matic Lubej Date: Wed, 6 Sep 2023 14:35:39 +0200 Subject: [PATCH] Slight fixes in the examples(#748) --- examples/io/SentinelHubIO.ipynb | 6 ++++-- examples/water-monitor/WaterMonitorWorkflow.ipynb | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/io/SentinelHubIO.ipynb b/examples/io/SentinelHubIO.ipynb index da6f6246..cbe6a281 100644 --- a/examples/io/SentinelHubIO.ipynb +++ b/examples/io/SentinelHubIO.ipynb @@ -280,7 +280,9 @@ "metadata": {}, "outputs": [], "source": [ - "add_dem = SentinelHubDemTask(data_collection=DataCollection.DEM_COPERNICUS_30, resolution=resolution, config=config)" + "add_dem = SentinelHubDemTask(\n", + " feature=\"dem\", data_collection=DataCollection.DEM_COPERNICUS_30, resolution=resolution, config=config\n", + ")" ] }, { @@ -711,7 +713,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.10" + "version": "3.10.4" }, "toc": { "base_numbering": 1, diff --git a/examples/water-monitor/WaterMonitorWorkflow.ipynb b/examples/water-monitor/WaterMonitorWorkflow.ipynb index 34a22e78..5d8fdf5e 100644 --- a/examples/water-monitor/WaterMonitorWorkflow.ipynb +++ b/examples/water-monitor/WaterMonitorWorkflow.ipynb @@ -526,8 +526,8 @@ " observed = closing(eopatch.mask[\"WATER_MASK\"][idx, ..., 0], disk(1))\n", " nominal = sobel(eopatch.mask_timeless[\"NOMINAL_WATER\"][..., 0])\n", " observed = sobel(observed)\n", - " nominal = np.ma.masked_where(~nominal, nominal)\n", - " observed = np.ma.masked_where(~observed, observed)\n", + " nominal = np.ma.masked_where(~nominal.astype(bool), nominal)\n", + " observed = np.ma.masked_where(~observed.astype(bool), observed)\n", "\n", " ax.imshow(nominal, cmap=plt.cm.Reds)\n", " ax.imshow(observed, cmap=plt.cm.Blues)\n",