Home | History | Annotate | Download | only in scripts

Lines Matching refs:numCols

574 	def __init__ (self, numCols, numRows, scalars):
575 assert len(scalars) == numRows*numCols
576 self.numCols = numCols
581 def identity (numCols, numRows):
583 for col in range(0, numCols):
586 return Mat(numCols, numRows, scalars)
589 assert 0 <= colNdx and colNdx < self.numCols
594 assert 0 <= colNdx and colNdx < self.numCols
598 def toMatrix (self, numCols, numRows):
599 res = Mat.identity(numCols, numRows)
600 for col in range(0, min(self.numCols, numCols)):
616 if self.numRows == self.numCols:
619 return "mat%dx%d" % (self.numCols, self.numRows)
625 return isinstance(other, Mat) and self.numRows == other.numRows and self.numCols == other.numCols
633 return Mat(self.numRows, self.numCols, [self.scalars(i) * val.scalars(i) for i in range(self.numRows*self.numCols)])