Hi, I am wondering why the default constructors without an argument for Array, e.g., Array{Float64,1}() and Array{Float64,2}() work without any problems while Array{Float64,3}() gives the following error?
Closest candidates are:
Array{Float64,3}{T,N}(!Matched::Tuple{Vararg{Int64,N}}) at boot.jl:310
Array{Float64,3}{T}(!Matched::Int64, !Matched::Int64, !Matched::Int64) at boot.jl:316
Array{Float64,3}{T}(!Matched::Any) at sysimg.jl:53
On the other hand, zeros(0); zeros(0,0); zeros(0,0,0) all work.
Thanks!
BVPs
On 0.6 (master) we decided that a zero size Vector/Matrix isn’t special enough so the sizes are required and the Vector{T}() constructors are deprecated.
Yes, they should, just like the Array{...}(x, y, z...)s. The removal (deprecation) of Vector{T}() and Matrix{T}() just make this more consistent (since you can’t do zeros() and get a 1 or 2d array anyway…)