hi everyone. i have a function that can return as output results of type Matrix{Categorical{Floaxx, Vector{Floatxx}}}
where xx stands for the usual 16,32 or 64.
i was trying to create a test for such function that check that the output has this generic kind of type but i don’t know how to do it. if i evaluate results<: AbstractArray it works but it’s too generic for what i want to do
julia> struct Categorical{S, T} end
julia> upper_bound = Matrix{Categorical{T, Vector{T}}} where {T <: AbstractFloat}
Array{Categorical{T, Vector{T}}, 2} where T<:AbstractFloat
julia> Matrix{Categorical{Float64, Vector{Float64}}} <: upper_bound
true
(In the first line I defined a parametric struct named Categorical just so the code would run. Yours should behave the same with the Categorical type that you are getting from somewhere.)