ParameterHandling.jl
ParameterHandling.jl copied to clipboard
Should `unflatten` unwrap `Fixed` values?
I am finally getting around to #30. In doing so I noticed:
julia> x = (1, 2.0, fixed(3.0))
(1, 2.0, ParameterHandling.Fixed{Float64}(3.0))
julia> v, unflatten = flatten(x);
julia> unflatten(v)
(1, 2.0, ParameterHandling.Fixed{Float64}(3.0))
Since wrapping something in Fixed
is only done for the sake of the flatten
/unflatten
machinery, I wonder if it would be better for unflatten
to return the unwrapped value of the Fixed
number, since that's all end users will generally care about. Or I guess another question to ask is: Are there any situations where the end user would want the Fixed
-wrapped value rather than just the value itself?