(self, calc_transformation=True)
return P, type(self)(J)
r"""Return Jordan form J of current matrix.

        Also the transformation P such that

            `J = P^{-1} \cdot M \cdot P`

        and the jordan blocks forming J
        will be calculated.


        Examples
        ========

        >>> from sympy import Matrix
        >>> m = Matrix([
        ...        [ 6,  5, -2, -3],
        ...        [-3, -1,  3,  3],
        ...        [ 2,  1, -2, -3],
        ...        [-1,  1,  5,  5]])
        >>> P, J = m.jordan_form()
        >>> J
        Matrix([
        [2, 1, 0, 0],
        [0, 2, 0, 0],
        [0, 0, 2, 1],
        [0, 0, 0, 2]])

        See Also
        ========

        jordan_cells
r"""Return Jordan form J of current matrix.
r Return Jordan form J of current matrix .
def jordan_form(self, calc_transformation=True):
        r"""Return Jordan form J of current matrix.

        Also the transformation P such that

            `J = P^{-1} \cdot M \cdot P`

        and the jordan blocks forming J
        will be calculated.


        Examples
        ========

        >>> from sympy import Matrix
        >>> m = Matrix([
        ...        [ 6,  5, -2, -3],
        ...        [-3, -1,  3,  3],
        ...        [ 2,  1, -2, -3],
        ...        [-1,  1,  5,  5]])
        >>> P, J = m.jordan_form()
        >>> J
        Matrix([
        [2, 1, 0, 0],
        [0, 2, 0, 0],
        [0, 0, 2, 1],
        [0, 0, 0, 2]])

        See Also
        ========

        jordan_cells
        """
        P, Jcells = self.jordan_cells()
        from sympy.matrices import diag
        J = diag(*Jcells)
        return P, type(self)(J)
def jordan_form ( self , calc_transformation = True ) : P , Jcells = self . jordan_cells ( ) from sympy . matrices import diag J = diag ( * Jcells ) return P , type ( self ) ( J )