(ctx, n, **kwargs)
return A
Create square identity matrix n x n.
Create square identity matrix n x n.
Create square identity matrix n x n .
def eye(ctx, n, **kwargs):
        """
        Create square identity matrix n x n.
        """
        A = ctx.matrix(n, **kwargs)
        for i in xrange(n):
            A[i,i] = 1
        return A
def eye ( ctx , n , * * kwargs ) : A = ctx . matrix ( n , * * kwargs ) for i in xrange ( n ) : A [ i , i ] = 1 return A