Fix doctest string and output shape