From 0a4ba003a469c366a45d310a37bedeea4f869210 Mon Sep 17 00:00:00 2001 From: Naty Clementi Date: Thu, 11 May 2017 16:45:47 -0400 Subject: [PATCH 1/2] Fix typo in 02.06-Boolean-Arrays-and-Masks Fixes #64 , 4 --> 8 --- notebooks/02.06-Boolean-Arrays-and-Masks.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/02.06-Boolean-Arrays-and-Masks.ipynb b/notebooks/02.06-Boolean-Arrays-and-Masks.ipynb index 813c891f6..5a7e150c2 100644 --- a/notebooks/02.06-Boolean-Arrays-and-Masks.ipynb +++ b/notebooks/02.06-Boolean-Arrays-and-Masks.ipynb @@ -650,7 +650,7 @@ } ], "source": [ - "# are all values in each row less than 4?\n", + "# are all values in each row less than 8?\n", "np.all(x < 8, axis=1)" ] }, From f3c57a2c4c0661838690698f2eb228a298213206 Mon Sep 17 00:00:00 2001 From: Naty Clementi Date: Fri, 26 May 2017 12:16:06 -0400 Subject: [PATCH 2/2] Fix typo in 02.07-Fancy-Indexing The second reference to `x[3]` in "You might expect that x[3] would contain the value 2, and x[3] would contain the value 3," should be x[4]. --- notebooks/02.07-Fancy-Indexing.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notebooks/02.07-Fancy-Indexing.ipynb b/notebooks/02.07-Fancy-Indexing.ipynb index b3680ffc2..b4aa99df8 100644 --- a/notebooks/02.07-Fancy-Indexing.ipynb +++ b/notebooks/02.07-Fancy-Indexing.ipynb @@ -709,7 +709,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "You might expect that ``x[3]`` would contain the value 2, and ``x[3]`` would contain the value 3, as this is how many times each index is repeated. Why is this not the case?\n", + "You might expect that ``x[3]`` would contain the value 2, and ``x[4]`` would contain the value 3, as this is how many times each index is repeated. Why is this not the case?\n", "Conceptually, this is because ``x[i] += 1`` is meant as a shorthand of ``x[i] = x[i] + 1``. ``x[i] + 1`` is evaluated, and then the result is assigned to the indices in x.\n", "With this in mind, it is not the augmentation that happens multiple times, but the assignment, which leads to the rather nonintuitive results.\n", "\n",