Numerical prototyping in Python assisted by automatic differentiation