Fixes in grads, doc and IPython dependency

Please find in this pull request what prevents my script to run properly on my OS X machine. Feel free to adapt it if needed according to other users.