The current implementation for extract is more of a subselect. It selects only the indices specified, but doesn't squash them into a more compact form (i.e. the shape of the input and output are the same). Extract should reduce the shape of the output based on the number of provided row and column indices.