Add docstring to learn_flat