diff --git a/src/flatten.jl b/src/flatten.jl index 82d5b60..ce68646 100644 --- a/src/flatten.jl +++ b/src/flatten.jl @@ -19,6 +19,12 @@ function flatten end flatten(x) = flatten(Float64, x) +function ParameterHandling.flatten(::Type{T}, ::Nothing) where {T<:Real} + v = T[] + unflatten_to_Nothing(::Vector{T}) = nothing + return v, unflatten_to_Nothing +end + function flatten(::Type{T}, x::Integer) where {T<:Real} v = T[] unflatten_to_Integer(v::Vector{T}) = x