Skip to content

Commit

Permalink
Add more tests for np.int64 indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanteleaga committed Apr 29, 2017
1 parent ca60092 commit 2874661
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions gensim/test/test_corpora.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:]))
Expand Down
2 changes: 1 addition & 1 deletion gensim/test/test_doc2vec.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,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
Expand Down

0 comments on commit 2874661

Please sign in to comment.