(parent, rowslice, colslice)
return MatrixSlice(parent.parent, row, col)
Collapse nested matrix slices

    >>> from sympy import MatrixSymbol
    >>> X = MatrixSymbol('X', 10, 10)
    >>> X[:, 1:5][5:8, :]
    X[5:8, 1:5]
    >>> X[1:9:2, 2:6][1:3, 2]
    X[3:7:2, 4]
Collapse nested matrix slices
Collapse nested matrix slices
def mat_slice_of_slice(parent, rowslice, colslice):
    """ Collapse nested matrix slices

    >>> from sympy import MatrixSymbol
    >>> X = MatrixSymbol('X', 10, 10)
    >>> X[:, 1:5][5:8, :]
    X[5:8, 1:5]
    >>> X[1:9:2, 2:6][1:3, 2]
    X[3:7:2, 4]
    """
    row = slice_of_slice(parent.rowslice, rowslice)
    col = slice_of_slice(parent.colslice, colslice)
    return MatrixSlice(parent.parent, row, col)
def mat_slice_of_slice ( parent , rowslice , colslice ) : row = slice_of_slice ( parent . rowslice , rowslice ) col = slice_of_slice ( parent . colslice , colslice ) return MatrixSlice ( parent . parent , row , col )