You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with_logabsdet_jacobian(f, x) currently breaks if f::InverseFunctions.FunctionWithInverse. Today @oschulz and I discussed the need for such a method. Could this be added? It will require a dependency on InverseFunctions.jl, but that's very light.
The text was updated successfully, but these errors were encountered:
But I think it does not scale and points to the design issues I raised in JuliaMath/InverseFunctions.jl#25. By wrapping a function in a FunctionWithInverse you break all downstream dispatches for the unwrapped function but it seems undesirable and unfeasible to add support for FunctionWithInverse to every single package. So I think the two general solutions are to (a) remove FunctionWithInverse and setinverse or (b) to unwrap it every time you call into another package that might dispatch on the function (with an unwrap function as suggested in JuliaMath/InverseFunctions.jl#25 (comment)). Since I assume (a) might not be an option for you, probably (b) is the best alternative.
I kind of like the unwrap idea - then we don't need much in the way of special cases, and it's very little additional code. Ok to close this unless either of you think there's more to discuss. Thanks!
with_logabsdet_jacobian(f, x)
currently breaks iff::InverseFunctions.FunctionWithInverse
. Today @oschulz and I discussed the need for such a method. Could this be added? It will require a dependency on InverseFunctions.jl, but that's very light.The text was updated successfully, but these errors were encountered: