-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
There is a wrong answer in 16 #125
Comments
You're right, we should use Z[1:-1,1:-1] instead of Z with the pad function. Can you make a PR ? |
|
The question is ambiguous but we can take advantage of it by simply distinguishing internal and external border. What do you think? |
1 similar comment
The question is ambiguous but we can take advantage of it by simply distinguishing internal and external border. What do you think? |
I think answer with pad function is more preferred because padding can’t/hard to be done with indexing. To me the question is clear: add a border to existing array. So, all existing data have to be preserved and an extra rows/columns have to be added |
import numpy as np |
Again I would distinguish external vs internal border in the answer. Can you make a PR? |
Two answers are given to 16, one is using np.pad and the second is using indexing.
But the first one adds a new border and the second one is just replaces current border.
The text was updated successfully, but these errors were encountered: