3 ms·
I've implemented this in Python a while ago, also (ab)using operator overload: https://github.com/boppreh/derivative https://github.com/boppreh/derivative Not
by BoppreH 10y ago
I've implemented this in Python a while ago, also (ab)using operator overload: https://github.com/boppreh/derivative https://github.com/boppreh/derivative
Not remarkable, but works.
f = lambda x: x * 5 + x ** 2 - 2 / x + 3 / x ** 2
print(derive(f, 6))
- abecedarius 10y agoSimilar: https://github.com/darius/sketchbook/blob/master/misc/autodiff.py https://github.com/darius/sketchbook/blob/master/misc/autodi...