Question: list[list, ...]

Is the first output correct?

m := [[1, 2], [3, 4]];

m[[1, 2], 2];
                             [3, 4]
Matrix(m)[[1, 2], 2];
                  Vector[column](2, [2, 4])

m[1 .. 2, 2];
                             [2, 4]
Matrix(m)[1 .. 2, 2];
                  Vector[column](2, [2, 4])

The other three map the index 2 over the indices [1,2], giving the second column. The first one does m[[1,2]][2] instead.

I couldn't find a definite statement in the documentation about how this should work for lists (not rtables).

Also, ?selection says:

"To select trailing elements, use A[..n]."

"Use A[...,a[i]] to select the ith column."

I think it should have been

"To select trailing elements, use A[n..]."

"Use A[...,i] to select the ith column."

Please Wait...