Suggestion for C1_W2_Lab01

Hello!

In 4.4.2 Slicing of C1_W2_Lab01, lines 8 and 9 are as follows:

# access 5 consecutive elements (start:stop:step) in two rows
print("a[:, 2:7:1] = \n", a[:, 2:7:1], ",  a[:, 2:7:1].shape =", a[:, 2:7:1].shape, "a 2-D array")

The comment suggests that this is used to access the elements in two rows, which was misleading to me at first. However,

a[:, 2:7:1]

an isolated semicolon is used to access elements in all rows, not just two rows as the comment suggests. Two just happens to be in this case.

I thought this could clarify things for other #DeepLearners!

2 Likes

Thanks for your suggestion!