I get the same error with Emacs 25.1.1. Python 3.5.2 and ipython 5 changed things quite a bit and Emacs has not caught up yet. I would file an Emacs bug report.
FYI: Use of the pylab import is now discouraged and and the OO interface is recommended for most non-interactive usage
And --pylab now deprecated from notebooks. I would create a jupiter profile and use plt. and np. conventions.
This is what I use:
(setq python-shell-interpreter-args "--simple-prompt --pprint")