JuliaLang/julia — pull request #1843 by stevengj (2012-12-28 22:08:06+00:00)
Title: allow x[1] for scalar x

to be consistent with the treatment of 0-dimensional arrays; note that `ndims(x)==0` and `length(x)==numel(x)==1` for scalar `x`.

See also the discussion in issue #1829.