Yes, I agree that this bit is inconsistent.
On Tue, May 13, 2014 at 9:20 AM, Milan Bouchet-Valat <[email protected]>wrote: > Le lundi 12 mai 2014 à 23:11 -0700, Ganesh Rapolu a écrit : > > I don't have any experience with tensors but it seems, at least on the > surface, that the convenience is not worth allowing the bugs that could be > prevented by enforcing 1 <= n <= ndims(A). > > However if that was the correct way to do things, then I would expect > this to work (viewing a scalar as a rank 0 tensor): > > julia> 5[1] > > 5 > > > julia> 5[1,1] > > ERROR: no method getindex(Int64,Int64,Int64) > > I'd say that either size(x, 2) should be an error when x is a scalar, or > that one should be able to do 5[1,1]. >
