-
Notifications
You must be signed in to change notification settings - Fork 5
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
Bug in strides
for reshaped views
#2
Comments
It does seem to be wrong. We probably need to have more robust support for ReshapedArrays overall in "stridelayout.jl" |
I will give it a shot. |
I don't think we can actually guarantee that a x = Array{Int}(undef, 5, 2, 5, 2);
xv = view(x, :, 1, :, :);
xvr = reshape(xv, 10, 5) If reshaping was done with static information we could figure this out at compile time, but with the current design of |
Yeah, that's like JuliaArrays/ArrayInterface.jl#162 (comment) |
These seem to be wrong, I think. Because of
ArrayInterface.strides(u_view) == (10,)
, thestrides
should beArrayInterface.strides(u_reshaped_view1) = (10 #= doesn't matter since there is only one element in this dimension =#, 10)
ArrayInterface.strides(u_reshaped_view1) = (10, 20)
Is that correct?
The text was updated successfully, but these errors were encountered: