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

Calling wizmap.generate_grid_dict triggers AttributeError: \np.Infinity\ was removed in the NumPy 2.0 release. Use np.inf instead. #26

Open
nguyenmp opened this issue Nov 19, 2024 · 0 comments

Comments

@nguyenmp
Copy link

I tried your library (super cool!) and ran into a slight problem where numpy seems to have deprecated np.Infinity in favor of np.inf.

I'm running this outside of then notebook so maybe this doesn't matter, but it looks like a breaking API change in numpy pervented me from using this. I patched it locally and it works fine. LMK if you want me to submit a Pull Request. It's just a one line change and very straightforward but wasn't sure about testing and release stuff.

>>> grid_dict = wizmap.generate_grid_dict(xs, ys, texts, 'IMDB Reviews')
Start generating contours...
Start generating multi-level summaries...
334it [00:00, 288725.79it/s]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/marknguyen/Library/Python/3.9/lib/python/site-packages/wizmap/wizmap.py", line 672, in generate_grid_dict
    topic_dict = generate_topic_dict(
  File "/Users/marknguyen/Library/Python/3.9/lib/python/site-packages/wizmap/wizmap.py", line 565, in generate_topic_dict
    min_level, max_level = select_topic_levels(
  File "/Users/marknguyen/Library/Python/3.9/lib/python/site-packages/wizmap/wizmap.py", line 497, in select_topic_levels
    best_tile_width_diff = np.Infinity
  File "/Users/marknguyen/Library/Python/3.9/lib/python/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.Infinity` was removed in the NumPy 2.0 release. Use `np.inf` instead.
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

1 participant