Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Automatic Differentiation in 26 lines of Python (gist.github.com)
2 points by montebicyclelo on Sept 18, 2022 | hide | past | favorite | 3 comments


Inspired by "Automatic Differentiation in 38 lines of Haskell", https://news.ycombinator.com/item?id=32879734


Funny, I find this harder to grok than the Haskell version. Haskell's static typing helps a lot.


Maybe familiarity with the languages? Though there probably is room to make this code more readable, without costing too many LOCs.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: