(cls, n)
return cls._new(n, n, mat)
Return an n x n identity matrix.
Return an n x n identity matrix.
Return an n x n identity matrix .
def eye(cls, n):
        """Return an n x n identity matrix."""
        n = as_int(n)
        mat = [cls._sympify(0)]*n*n
        mat[::n + 1] = [cls._sympify(1)]*n
        return cls._new(n, n, mat)
def eye ( cls , n ) : n = as_int ( n ) mat = [ cls . _sympify ( 0 ) ] * n * n mat [ : : n + 1 ] = [ cls . _sympify ( 1 ) ] * n return cls . _new ( n , n , mat )