Closed oschulz closed 2 years ago
@oschulz: Thanks for the nice PR. Should I tag a release, or are you planning more additions?
Should I tag a release
That would be great, thanks!
or are you planning more additions?
No, I think this is complete (as far as I can see for now :-) ).
I thought about proposing that TransformVariables just adopts InverseFunctions.inverse
as it's own inverse
, but the semantics are a bit different - InverseFunctions.inverse
is more restrictive, it expects that it's argument is a function (not a Function
but callable).
Btw., input on ChangesOfVariables and InverseFunctions is very welcome of course - me and @devmotion created them, but they're really intended to be standards for and carried/evolved by the whole community.
This PR adds support for JuliaMath/ChangesOfVariables and JuliaMath/InverseFunctions. Both are very lightweight, dependency-free, low-bias packages designed to enable composability of packages that provide/implement or use variable transformation capabilities.
Specifically, this PR adds support for
ChangesOfVariables.test_with_logabsdet_jacobian
andInverseFunctions.inverse
. Package like StatsFuns and LogExpFunctions already support one or both of them (JuliaStats/LogExpFunctions.jl#29, JuliaStats/LogExpFunctions.jl#30, JuliaStats/StatsFuns.jl#130). I think it would be awesome if TransformVariables would join the club.This PR has no impact on the load time of TransformVariables
CC @devmotion