Closed
Description
For previous discussion, see: https://groups.google.com/forum/#!topic/julia-users/FBmU-mxQ0k4
My request is to have functionality to be able to initialize a vector of size N
and type T
using the Vector(T, N)
command. This would be equivalent to the current Array(T, N)
. The reason for this is that it if I have a function taking a Vector
argument it feels nice to create the vector I send in to the function using a Vector
constructor. Same for matrices.
I tried to implement it myself like this (and in some other ways) but it is not working:
Base.call{T}(::Vector{T}, size::Int) = Array(T, size)