TST/DOC: Add tests and docstrings for subset function