Py3: fix version comparison in imputation module