On Thu, Feb 17, 2022 at 5:40 PM Stephan Hoyer <shoyer@gmail.com> wrote:
On Wed, Feb 16, 2022 at 11:52 PM Anirudh Dagar <anirudhdagar6@gmail.com> wrote:
The question about the other two methods i.e (derivative, central_diff_weights) is up for discussion and I'd like to understand what will be the best way to deprecate them. Should we move them to a submodule like integrate (keeping derivative makes sense to me)? On the other hand, considering these two methods are not used extensively so one possibility is to deprecate both of them completely and remove them from SciPy.
I would vote for removing them entirely.
If we were to keep them in SciPy, they might belong in scipy.optimize next to check_grad and approx_frime. But I don't think these functions (as written) are very useful. They have obvious computational inefficiencies and very limited functionality. I would rather point users to a fully functioning library for finite-differences like findiff: https://github.com/maroba/findiff
Thanks Stephan! I didn't hear about findiff before. Would you recommend it over https://github.com/pbrod/numdifftools?
The implementation of these functions is ~50 lines of very straightforward NumPy code, so I can imagine moving them into something like a GitHub Gist or StackOverflow answer that users could copy & paste. This should resolve the backwards compatibility concerns when they are removed.
I agree. Cheers, Ralf