Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LDA u_mass coherence calculation triggers numpy deprecation warning #765

Closed
masscognition opened this issue Jun 29, 2016 · 3 comments
Closed

Comments

@masscognition
Copy link

Using Python 2.7.11, latest gensim , latest numpy.

Line 41 of segmentation.py:

for w_star in top_words[:w_prime_index]:

triggers this warning from numpy:

DeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future

fix is to cast w_prime_index to int

Also via Devashish:

"the comment right next to

w_prime_index = np.where(top_words == w_prime)[0] should be # To get index of w_prime in top_words (apologies for my mistake)."

@devashishd12
Copy link
Contributor

Thanks for raising this issue! Would you mind raising a PR fix for this? You can follow a workflow similar to that given here: http://scikit-learn.org/stable/developers/contributing.html#contributing-code. Would be happy to help if you encounter any problems.

@devashishd12
Copy link
Contributor

Sorry @masscognition I addressed this issue in #793 since I happened to be working on the same thing. Thanks for raising the issue though!

@masscognition
Copy link
Author

No problem :-)

On Mon, Jul 18, 2016 at 2:35 PM, Devashish Deshpande <
notifications@github.com> wrote:

Sorry @masscognition https://github.com/masscognition I addressed this
issue in #793 #793
since I happened to be working on the same thing. Thanks for raising the
issue though!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#765 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ANdXmh09dNhOftQV_VZFXA7fDHjDPNgsks5qW8eEgaJpZM4JBlYf
.

@tmylk tmylk closed this as completed Oct 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants