You need to use Array{<:Number, 1} instead of Array{Number}. The problem is that even though Int <: Number is true, Array{Int, 1} <: Array{Number, 1} is false.
5 Likes
You need to use Array{<:Number, 1} instead of Array{Number}. The problem is that even though Int <: Number is true, Array{Int, 1} <: Array{Number, 1} is false.