Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update in the Numpy Excercise File #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yashpatel2911
Copy link

@yashpatel2911 yashpatel2911 commented Jan 2, 2021

In the Exercise of the NumPy File in the task "Given the X NumPy matrix, show the last two elements on the last two rows", your mentioned answer is X[2:,2:] which is wrong instead the answer is X[-2:,-2:] which will give you definitely last two rows of last elements. What if we have 6 rows and 6 cols? For that The output of X[2:, 2:] will be an array shape of (4,4) instead of (2, 2).

@yashpatel2911 yashpatel2911 changed the title Updating the Numpy Excercise File Update in the Numpy Excercise File Jan 2, 2021
@AzureByte
Copy link

Noticed this erratum too. Apart from changing the python version of the notebook, fix looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants