Skip to content

"end" indexing not working properly #19

@Sixzero

Description

@Sixzero

I believe there is something wrong with indexing.
Code:

using EllipsisNotation
A = randn(2,3,4);
@show size(A[.., 1:end]);

Output:

julia> using EllipsisNotation

julia> A = randn(2,3,4);

julia> @show size(A[.., 1:end]);
size(A[.., 1:end]) = (2, 3, 3)

The output should size should be (2, 3, 4) not (2, 3, 3).

I believe this is a critical issue and should be noted somewhere.

What is happeneing is that end will be equal to size(A, 2), which is 3 and not size(A, 3) which is 4 what is the real position of the "end" in this case.

Also worth noting:
@show size(A[.., 1:end-1]) # outputs: (2, 3, 2)

So basically at least the problem is with indexing positions and nothing more.

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