julia> Float16 <: AbstractFloat
true
julia> Vector{Float16} <: AbstractVector
true
julia> Vector{Float16} <: AbstractVector{AbstractFloat}
false
why?
julia> Float16 <: AbstractFloat
true
julia> Vector{Float16} <: AbstractVector
true
julia> Vector{Float16} <: AbstractVector{AbstractFloat}
false
why?
See https://docs.julialang.org/en/v1.1/manual/types/index.html#Parametric-Composite-Types-1. AbstractVector{<:AbstractFloat}
, or, equivalently, AbstractVector{T} where T<:AbstractFloat
should do what you want.