diff --git a/gensim/models/tfidfmodel.py b/gensim/models/tfidfmodel.py index a4cbedcd22..b45d1652a1 100644 --- a/gensim/models/tfidfmodel.py +++ b/gensim/models/tfidfmodel.py @@ -390,10 +390,9 @@ def initialize(self, corpus): self.num_nnz = numnnz self.dfs = dfs # and finally compute the idf weights - n_features = max(dfs) if dfs else 0 logger.info( "calculating IDF weights for %i documents and %i features (%i matrix non-zeros)", - self.num_docs, n_features, self.num_nnz + self.num_docs, max(dfs.keys()) + 1 if dfs else 0, self.num_nnz ) self.idfs = precompute_idfs(self.wglobal, self.dfs, self.num_docs)