#NEWLINE# def jordan_cell( eigenval , n ) : #NEWLINE# #INDENT# '\n    Create matrix of Jordan cell kind:\n\n    Examples\n    ========\n\n    >>> from sympy.matrices import jordan_cell\n    >>> from sympy.abc import x\n    >>> jordan_cell(x, 4)\n    Matrix([\n    [x, 1, 0, 0],\n    [0, x, 1, 0],\n    [0, 0, x, 1],\n    [0, 0, 0, x]])\n    ' #NEWLINE# n = as_int ( n ) #NEWLINE# out = zeros ( n ) #NEWLINE# for i in range ( ( n - 1 ) ) : #NEWLINE# #INDENT# out [ ( out , i ) ] = eigenval #NEWLINE# out [ ( i , ( i + 1 ) ) ] = S . One #NEWLINE# #UNINDENT# out [ ( ( n - 1 ) , ( n - 1 ) ) ] = eigenval #NEWLINE# return out