Skip to content

Strides on when SubArray has a scalar sub index #11

@Tokazama

Description

@Tokazama

I've been getting incorrect results when using scalar indexing that doesn't start with one on views.

julia> A = zeros(3, 4, 5);

julia> A[:] = 1:60;

julia> Aview = view(A, :, 2, :);

julia> ArrayInterface.StrideIndex(Aview)[1,1]
1

julia> Aview[1,1]
4.0

julia> Aview = view(A, 2, :, :);

julia> ArrayInterface.StrideIndex(Aview)[1,1]
1

julia> Aview[1,1]
2.0

Should we be combining those scalar indices with strides?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions