Lines Matching refs:numCols
739 def __init__ (self, numCols, numRows, scalars): argument
740 assert len(scalars) == numRows*numCols
741 self.numCols = numCols
746 def fromScalar (numCols, numRows, scalar): argument
748 for col in range(0, numCols):
751 return Mat(numCols, numRows, scalars)
754 def identity (numCols, numRows): argument
755 return Mat.fromScalar(numCols, numRows, 1.0)
758 assert 0 <= colNdx and colNdx < self.numCols
763 assert 0 <= colNdx and colNdx < self.numCols
767 def toMatrix (self, numCols, numRows): argument
768 res = Mat.identity(numCols, numRows)
769 for col in range(0, min(self.numCols, numCols)):
785 if self.numRows == self.numCols:
788 return "mat%dx%d" % (self.numCols, self.numRows)
794 return isinstance(other, Mat) and self.numRows == other.numRows and self.numCols == other.numCols
802 …return Mat(self.numRows, self.numCols, [self.scalars(i) * val.scalars(i) for i in range(self.numRo…