On Tue, 2016-06-07 at 05:47, David Parks <davidpark...@gmail.com> wrote:
> Is there hidden logic behind this command that I don't see, or did I bump
> into a genuine bug here?  v0.4.5

Are you referring to the random value?

help?> Array
...
  Array{T}(dims) constructs an uninitialized dense array with element type T. 
dims may be a tuple or a series of integer arguments. The syntax

Thus it doesn't do anything to what's in that memory location from
before.  Usually better to use zeros(Int).  There has been some
discussion on github to make that the default as zeroing does not take
much (any?) time.

Or are you referring to the 0-dims?  Those are also expected.

>
> julia> x = Array{Int64}()
> 0-dimensional Array{Int64,0}:
> 47917330527848
>
> julia> for i in x; println(i); end
> 47917330527848
>
> julia> println(x)
> 47917330527848
>
> julia> print(typeof(x))
> Array{Int64,0}

Reply via email to