iPython notebook formula