http://docs.julialang.org/en/release-0.3/manual/types/#parametric-composite-types
Use foo{V<:VecOrMat}(X::Vector{V})
--Tim
On Tuesday, April 28, 2015 02:40:41 AM Ján Dolinský wrote:
> Hi guys,
>
> I am trying to write a function which accepts as an input either a vector
> of vectors or a vector of matrices e.g.
>
> function foo(X::Vector{VecOrMat{Float64}})
>
> When running the function with a vector of matrices I get the following
> error " 'foo' has no method matching foo(::Array{Array{Float64,2},1})"
>
> Am I missing something here ?
>
> Thanks,
> Jan