Another simple wrapper to improve compatibility with sklearn