':key: åå§åå³äºarticleçç»è®¡è®¡æ°ãåå³æ¡ä»¶: self.M, self.K, self.Z'

def init_statistics_document(self):

    assert ((self.M > 0) and (self.K > 0) and self.Z)
    self.nd = numpy.zeros((self.M, self.K), dtype=numpy.int)
    self.ndsum = numpy.zeros((self.M, 1), dtype=numpy.int)
    for m in range(self.M):
        for k in self.Z[m]:
            self.nd[(m, k)] += 1
        self.ndsum[(m, 0)] = len(self.Z[m])
    return
