Lines Matching refs:numCols
741 def __init__ (self, numCols, numRows, scalars): argument
742 assert len(scalars) == numRows*numCols
743 self.numCols = numCols
748 def fromScalar (numCols, numRows, scalar): argument
750 for col in range(0, numCols):
753 return Mat(numCols, numRows, scalars)
756 def identity (numCols, numRows): argument
757 return Mat.fromScalar(numCols, numRows, 1.0)
760 assert 0 <= colNdx and colNdx < self.numCols
765 assert 0 <= colNdx and colNdx < self.numCols
769 def toMatrix (self, numCols, numRows): argument
770 res = Mat.identity(numCols, numRows)
771 for col in range(0, min(self.numCols, numCols)):
787 if self.numRows == self.numCols:
790 return "mat%dx%d" % (self.numCols, self.numRows)
796 return isinstance(other, Mat) and self.numRows == other.numRows and self.numCols == other.numCols
804 …return Mat(self.numRows, self.numCols, [self.scalars(i) * val.scalars(i) for i in range(self.numRo…