diff --git a/gensim/test/test_corpora.py b/gensim/test/test_corpora.py index 9d0d1c97f0..d9fe49ea69 100644 --- a/gensim/test/test_corpora.py +++ b/gensim/test/test_corpora.py @@ -168,6 +168,7 @@ def test_indexing(self): for idx, doc in enumerate(docs): self.assertEqual(doc, corpus[idx]) + self.assertEqual(doc, corpus[np.int64(idx)]) self.assertEqual(docs, list(corpus[:])) self.assertEqual(docs[0:], list(corpus[0:])) diff --git a/gensim/test/test_doc2vec.py b/gensim/test/test_doc2vec.py index 2119a15a91..e4367732e7 100644 --- a/gensim/test/test_doc2vec.py +++ b/gensim/test/test_doc2vec.py @@ -146,7 +146,7 @@ def test_similarity_unseen_docs(self): def model_sanity(self, model, keep_training=True): """Any non-trivial model on DocsLeeCorpus can pass these sanity checks""" fire1 = 0 # doc 0 sydney fires - fire2 = 8 # doc 8 sydney fires + fire2 = np.int64(8) # doc 8 sydney fires tennis1 = 6 # doc 6 tennis # inferred vector should be top10 close to bulk-trained one