5 ms·
I DO think Python libraries can do this already.
by eccstartup 11y ago
I DO think Python libraries can do this already.
- jamessb 11y agoThe scipy.misc.derivative() function uses a central difference formula, rather than exploiting the fact that a function is analytic: https://docs.scipy.org/doc/scipy/reference/generated/scipy.misc.derivative.html https://docs.scipy.org/doc/scipy/reference/generated/scipy.m... Applying the Cauchy–Riemann equations to essentially take finite differences in the imaginary direction is an interesting trick I hadn't seen before, so I appreciated an article introducing it. Edit: A separate python package, Numdifftools, does seem to support complex-step differentiation https://pypi.python.org/pypi/Numdifftools https://pypi.python.org/pypi/Numdifftools
- eriktaubeneck 11y agoDid not intend to make any claims that Python libraries don't do this, but rather to explore the subject as a way to better understand the implementation and limits of floating point numbers and numerical analysis based on them.