WIP: Python3 conversion

There are my changes to make scikit-learn python2/3 compatible.