Lines Matching refs:numCols
596 def __init__ (self, numCols, numRows, scalars): argument
597 assert len(scalars) == numRows*numCols
598 self.numCols = numCols
603 def identity (numCols, numRows): argument
605 for col in range(0, numCols):
608 return Mat(numCols, numRows, scalars)
611 assert 0 <= colNdx and colNdx < self.numCols
616 assert 0 <= colNdx and colNdx < self.numCols
620 def toMatrix (self, numCols, numRows): argument
621 res = Mat.identity(numCols, numRows)
622 for col in range(0, min(self.numCols, numCols)):
638 if self.numRows == self.numCols:
641 return "mat%dx%d" % (self.numCols, self.numRows)
647 return isinstance(other, Mat) and self.numRows == other.numRows and self.numCols == other.numCols
655 …return Mat(self.numRows, self.numCols, [self.scalars(i) * val.scalars(i) for i in range(self.numRo…