tpapp / TransformVariables.jl

Transformations to contrained variables from ℝⁿ.
Other
66 stars 14 forks source link

transform of asℝ₊ variable turns Float32 into Float64 #84

Closed jonalm closed 3 years ago

jonalm commented 3 years ago

Don't know if this is considered a bug, but I see the following behavior:

> t = as((; α = asℝ₊, β = asℝ ))
> typeof(transform(t)(Float32[1,2]))
NamedTuple{(:α, :β), Tuple{Float64, Float32}}

I was expecting both values to be of Float32 type.

tpapp commented 3 years ago

Thanks for the bug report, this was unintended and should be fixed now.