Lines Matching refs:numCols
717 def __init__ (self, numCols, numRows, scalars): argument
718 assert len(scalars) == numRows*numCols
719 self.numCols = numCols
724 def fromScalar (numCols, numRows, scalar): argument
726 for col in range(0, numCols):
729 return Mat(numCols, numRows, scalars)
732 def identity (numCols, numRows): argument
733 return Mat.fromScalar(numCols, numRows, 1.0)
736 assert 0 <= colNdx and colNdx < self.numCols
741 assert 0 <= colNdx and colNdx < self.numCols
745 def toMatrix (self, numCols, numRows): argument
746 res = Mat.identity(numCols, numRows)
747 for col in range(0, min(self.numCols, numCols)):
763 if self.numRows == self.numCols:
766 return "mat%dx%d" % (self.numCols, self.numRows)
772 return isinstance(other, Mat) and self.numRows == other.numRows and self.numCols == other.numCols
780 …return Mat(self.numRows, self.numCols, [self.scalars(i) * val.scalars(i) for i in range(self.numRo…