fix for python3 compatibility
Merge pull request #77 from lxyu/py3_fix_for_ipynb

fix for python3 compatibility