From de1444c02be3d225eb13190719457017d038c534 Mon Sep 17 00:00:00 2001 From: Jonas Jonker Date: Wed, 9 Jun 2021 16:01:29 +0200 Subject: [PATCH] document getindex() with range of length 1. (#41140) 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. --- doc/src/manual/arrays.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/manual/arrays.md b/doc/src/manual/arrays.md index c3c014ccb64fe..57acf2ca5acf3 100644 --- a/doc/src/manual/arrays.md +++ b/doc/src/manual/arrays.md @@ -695,6 +695,12 @@ julia> A[:, 3] 13 15 17 + +julia> A[:, 3:3] +3×1 Matrix{Int64}: + 13 + 15 + 17 ``` ### Cartesian indices