Why size(vector, 2) return 1?

https://docs.julialang.org/en/v1/manual/arrays/#Omitted-and-extra-indices

Similarly, more than N indices may be provided if all the indices beyond the dimensionality of the array are 1 (or more generally are the first and only element of axes(A, d) where d is that particular dimension number). This allows vectors to be indexed like one-column matrices.

1 Like