def _get_slice(self, i, start, stop, stride, shape):
if stride != <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if stop <= start:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>indices = []<EOL>for ind in xrange(self.indptr[i], self.indptr[i+<NUM_LIT:1>]):<EOL><INDENT>if self.indices[ind] >= start and self.indices[ind] < stop:<EOL><INDENT>indices.append(ind)<EOL><DEDENT><DEDENT>index = self.indices[indices] - start<EOL>data = self.data[indices]<EOL>indptr = np.array([<NUM_LIT:0>, len(indices)])<EOL>return self.__class__((data, index, indptr), shape=shape,<EOL>dtype=self.dtype)<EOL>
Returns a copy of the elements
            [i, start:stop:string] for row-oriented matrices
            [start:stop:string, i] for column-oriented matrices