-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Solution for 76 (Can be wrong when use a view of array as input) #147
Comments
Good catch! This is actually an error I think, thanks. Can you make a PR? |
Okay! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
76. Consider a one-dimensional array Z, build a two-dimensional array whose first row is (Z[0],Z[1],Z[2]) and each subsequent row is shifted by 1 (last row should be (Z[-3],Z[-2],Z[-1])
When use view of array with strides as input.
The output
My solution is using
strides
instead ofitemsize
. Therefore, the answer looks like this:In this way, the result is correct.
The text was updated successfully, but these errors were encountered: