Pull request: https://github.com/JuliaLang/julia/pull/6828.


On Tue, May 13, 2014 at 1:35 AM, Stefan Karpinski <[email protected]>wrote:

> The idea is that you can treat lower dimensional tensors as if they were
> higher dimensional with trailing singleton dimensions. Thus, if you have a
> vector – i.e. an array with a single dimension – but you want to treat it
> as a matrix, you can do
>
> m, n = size(x,1), size(x,2)
>
> and it will work. Speaking of which, I've been meaning to make size(x,1,2)
> work for a while now. PR coming...
>
>
> On Tue, May 13, 2014 at 1:29 AM, Ganesh Rapolu <[email protected]>wrote:
>
>> For an array A if n > ndims(A), then size(A,n) currently returns 1. Is
>> this an error or is there some reasoning behind this? It does the right
>> thing (gives an error saying "dimension out of range") when n <= 0. Also I
>> wanted to add that I am enjoying Julia a lot! You guys did a great job with
>> the language.
>>
>
>

Reply via email to