(cls, *args)
return result
Creates an identity matrix.

        @keyword shape: the shape of the matrix. Can be a single integer,
          two integers or a tuple. If a single integer is
          given here, the matrix is assumed to be square-shaped.
Creates an identity matrix.
Creates an identity matrix .
def Identity(cls, *args):
        """Creates an identity matrix.

        @keyword shape: the shape of the matrix. Can be a single integer,
          two integers or a tuple. If a single integer is
          given here, the matrix is assumed to be square-shaped.
        """
        result = cls.Fill(0, *args)
        for i in range(min(result.shape)):
            result._data[i][i] = 1
        return result
def Identity ( cls , * args ) : result = cls . Fill ( 0 , * args ) for i in range ( min ( result . shape ) ) : result . _data [ i ] [ i ] = 1 return result