def clean_outcpd(self):
m = self.hist_.toDense()<EOL>for j in xrange(m.shape[<NUM_LIT:1>]): <EOL><INDENT>cmax = m[:,j].max()<EOL>if cmax:<EOL><INDENT>m[:,j] = numpy.array(m[:,j] == cmax, dtype=dtype)<EOL><DEDENT><DEDENT>self.hack_ = SparseMatrix(<NUM_LIT:0>, self.hist_.nCols())<EOL>for i in xrange(m.shape[<NUM_LIT:0>]):<EOL><INDENT>self.hack_.addRow(m[i,:])<EOL><DEDENT>
Hack to act like clean_outcpd on zeta1.TopLevelNode.
        Take the max element in each to column, set it to 1, and set all the
        other elements to 0.
        Only called by inferRowMaxProd() and only needed if an updateRow()
        has been called since the last clean_outcpd().