Use the assert functions from sklearn.utils.testing whenever possible.
If there are many float divisions, you might consider to use `from __future__ import division`.