Skip to content

Commit

Permalink
document getindex() with range of length 1. (JuliaLang#41140)
Browse files Browse the repository at this point in the history
Added an example with A[:, 3:3] which returns a Matrix instead of a
Vector. Somebody made me aware of this behavior on
[stackoverflow](https://stackoverflow.com/questions/67889148/let-indexing-return-a-matrix-instead-of-a-vector-in-julia).
but I couldn't find an example of it in the documentation.
  • Loading branch information
jonasjonker committed Jun 9, 2021
1 parent 5b40680 commit de1444c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions doc/src/manual/arrays.md
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,12 @@ julia> A[:, 3]
13
15
17
julia> A[:, 3:3]
3×1 Matrix{Int64}:
13
15
17
```

### Cartesian indices
Expand Down

0 comments on commit de1444c

Please sign in to comment.