Skip to content

Commit 4693f13

Browse files
author
Matic Lubej
authored
Slight fixes in the examples(#748)
1 parent 7fb9bb5 commit 4693f13

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/io/SentinelHubIO.ipynb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,9 @@
280280
"metadata": {},
281281
"outputs": [],
282282
"source": [
283-
"add_dem = SentinelHubDemTask(data_collection=DataCollection.DEM_COPERNICUS_30, resolution=resolution, config=config)"
283+
"add_dem = SentinelHubDemTask(\n",
284+
" feature=\"dem\", data_collection=DataCollection.DEM_COPERNICUS_30, resolution=resolution, config=config\n",
285+
")"
284286
]
285287
},
286288
{
@@ -711,7 +713,7 @@
711713
"name": "python",
712714
"nbconvert_exporter": "python",
713715
"pygments_lexer": "ipython3",
714-
"version": "3.8.10"
716+
"version": "3.10.4"
715717
},
716718
"toc": {
717719
"base_numbering": 1,

examples/water-monitor/WaterMonitorWorkflow.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -526,8 +526,8 @@
526526
" observed = closing(eopatch.mask[\"WATER_MASK\"][idx, ..., 0], disk(1))\n",
527527
" nominal = sobel(eopatch.mask_timeless[\"NOMINAL_WATER\"][..., 0])\n",
528528
" observed = sobel(observed)\n",
529-
" nominal = np.ma.masked_where(~nominal, nominal)\n",
530-
" observed = np.ma.masked_where(~observed, observed)\n",
529+
" nominal = np.ma.masked_where(~nominal.astype(bool), nominal)\n",
530+
" observed = np.ma.masked_where(~observed.astype(bool), observed)\n",
531531
"\n",
532532
" ax.imshow(nominal, cmap=plt.cm.Reds)\n",
533533
" ax.imshow(observed, cmap=plt.cm.Blues)\n",

0 commit comments

Comments
 (0)