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

adapt for numpy 2.0 #922

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vincentsarago
Copy link

np.unicode_ has been removed in Numpy 2.0

hug/hug/output_format.py

Lines 145 to 147 in e4a3fa4

@json_convert(str, numpy.unicode_)
def numpy_stringable(item):
return str(item)

   import hug
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/hug/__init__.py", line 36, in <module>
    from hug import (
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/hug/output_format.py", line 145, in <module>
    @json_convert(str, numpy.unicode_)
                       ^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.9/x64/lib/python3.11/site-packages/numpy/__init__.py", line 397, in __getattr__
    raise AttributeError(
AttributeError: `np.unicode_` was removed in the NumPy 2.0 release. Use `np.str_` instead.

@vincentsarago vincentsarago changed the title adapt for python 2.0 adapt for numpy 2.0 Jul 4, 2024
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

Successfully merging this pull request may close these issues.

1 participant