Closed devmotion closed 2 years ago
Eeehh I should have let you merge in case you weren't done with it (realized you hadn't requested a review yet), though it looks good to me. I'll wait with release until you given me a thumbs-up that it's all good :+1:
No worries, all good 👍
This PR replaces NonlinearSolve with Roots for solving the root finding problem in the inverse of the planar layer.
I fixed some type inference problems in Roots some weeks ago (https://github.com/JuliaMath/Roots.jl/pull/245) and some time ago also the convergence and AD issues of this algorithm were fixed by https://github.com/TuringLang/Bijectors.jl/pull/126 by using an improved initial bracket and custom adjoints (BTW the ReverseDiff adjoint was never used and broken, it's fixed in this PR as well); so the motivation and reasons for https://github.com/TuringLang/Bijectors.jl/pull/155 (move from Roots to NonlinearSolve) are gone.
The main motivation for this PR is (apart from the ReverseDiff bugfix) that it reduces the dependencies of Bijectors quite dramatically and hence makes the package more lightweight (https://github.com/TuringLang/Bijectors.jl/issues/199). With the master branch, removing NonlinearSolve and adding Roots removes and adds the following indirect dependencies (note that all indirect dependencies added by Roots are already present due to NonlinearSolve):