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

Deprecation Warning for sparsetools namespace #3479

Open
mark-todd opened this issue Jun 12, 2023 · 2 comments
Open

Deprecation Warning for sparsetools namespace #3479

mark-todd opened this issue Jun 12, 2023 · 2 comments

Comments

@mark-todd
Copy link
Contributor

I'm receiving a deprecation warning when using gensim within pytest. It's related to this issue #3014, but now with hopefully a much simpler solution.

DeprecationWarning: Please use `csc_matvecs` from the `scipy.sparse` namespace, the `scipy.sparse.sparsetools` namespace is deprecated.

Referencing here:
https://github.com/RaRe-Technologies/gensim/blob/develop/gensim/models/lsimodel.py#LL69C1-L69C37

The latest deprecation warning now says to just change the import location, so should be very easy to resolve by changing:

from scipy.sparse import sparsetools

to

from scipy.sparse import csc_matvecs

Then updating references to csc_matvecs

@piskvorky
Copy link
Owner

Great! Can you test this out please & open a PR? Thanks.

@mark-todd
Copy link
Contributor Author

Just tested but sadly the csc_matvecs functions only exists in sparsetools - the deprecation message was autogenerated and incorrect. However, the message can be removed by importing from _sparsetools instead of sparsetools

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

2 participants