You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/numpy/numpy-intermediate.ipynb
+6-13Lines changed: 6 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -111,7 +111,8 @@
111
111
"cell_type": "code",
112
112
"execution_count": null,
113
113
"metadata": {
114
-
"scrolled": true
114
+
"scrolled": true,
115
+
"tags": []
115
116
},
116
117
"outputs": [],
117
118
"source": [
@@ -302,8 +303,9 @@
302
303
"\n",
303
304
"# BONUS POINTS: Plot only the data where heat index is defined by\n",
304
305
"# inverting the mask (using ~mask) and setting invalid values to np.nan\n",
305
-
"temp[~good_heat_index] = np.nan\n",
306
-
"plt.plot(temp, 'tab:red')"
306
+
"plot_temp = temp.copy()\n",
307
+
"plot_temp[~good_heat_index] = np.nan\n",
308
+
"plt.plot(plot_temp, 'tab:red')"
307
309
]
308
310
},
309
311
{
@@ -403,16 +405,7 @@
403
405
"cell_type": "markdown",
404
406
"metadata": {},
405
407
"source": [
406
-
"There are other numpy arg functions that return indices for operating:"
407
-
]
408
-
},
409
-
{
410
-
"cell_type": "code",
411
-
"execution_count": null,
412
-
"metadata": {},
413
-
"outputs": [],
414
-
"source": [
415
-
"np.*arg*?"
408
+
"There are other numpy arg functions that return indices for operating; check out the [NumPy docs](https://numpy.org/doc/stable/reference/routines.sort.html) on sorting your arrays!"
0 commit comments