Converted scipy cookbook