Home | History | Annotate | Download | only in scripts

Lines Matching refs:numCols

713 	def __init__ (self, numCols, numRows, scalars):
714 assert len(scalars) == numRows*numCols
715 self.numCols = numCols
720 def fromScalar (numCols, numRows, scalar):
722 for col in range(0, numCols):
725 return Mat(numCols, numRows, scalars)
728 def identity (numCols, numRows):
729 return Mat.fromScalar(numCols, numRows, 1.0)
732 assert 0 <= colNdx and colNdx < self.numCols
737 assert 0 <= colNdx and colNdx < self.numCols
741 def toMatrix (self, numCols, numRows):
742 res = Mat.identity(numCols, numRows)
743 for col in range(0, min(self.numCols, numCols)):
759 if self.numRows == self.numCols:
762 return "mat%dx%d" % (self.numCols, self.numRows)
768 return isinstance(other, Mat) and self.numRows == other.numRows and self.numCols == other.numCols
776 return Mat(self.numRows, self.numCols, [self.scalars(i) * val.scalars(i) for i in range(self.numRows*self.numCols)])