-
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
Strides on when SubArray has a scalar sub index #11
Comments
julia> A = zeros(3, 4, 5);
julia> A[:] = 1:60;
julia> Aview = view(A, :, 2, :);
julia> ArrayInterface.StrideIndex(Aview)[1,1]
1
julia> Aview[ArrayInterface.StrideIndex(Aview)[1,1]]
4.0
julia> Aview[1,1]
4.0 What's the desired behavior here? In that case, the |
Also, methods like julia> using ArrayInterface
julia> A = zeros(3, 4, 5);
julia> A[:] = 1:60;
julia> Aview = view(A, :, 2, :);
julia> unsafe_load(pointer(Aview), ArrayInterface.StrideIndex(Aview)[1,1])
4.0
julia> Aview[1,1]
4.0
julia> Aview = view(A, 2, :, :);
julia> unsafe_load(pointer(Aview), ArrayInterface.StrideIndex(Aview)[1,1])
2.0
julia> Aview[1,1]
2.0 |
I've been getting incorrect results when using scalar indexing that doesn't start with one on views.
Should we be combining those scalar indices with strides?
The text was updated successfully, but these errors were encountered: