doctests for subspace