note in the documentation that this creates new memory if there is a subset and returns vector using existing memory if no subset if there