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

AttributeError: module 'numpy' has no attribute 'int'. #1173

Closed
aforadil opened this issue Aug 23, 2023 · 0 comments
Closed

AttributeError: module 'numpy' has no attribute 'int'. #1173

aforadil opened this issue Aug 23, 2023 · 0 comments
Labels
documentation Improvements or additions to documentation example request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@aforadil
Copy link

I am having this issue upon using show_records function. it would be great if someone can guide to workaround this:

"AttributeError: module 'numpy' has no attribute 'int'.
np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations"

Detailed Error:
(new) C:\Users\Madil2>python code21.py > output.txt
INFO - Loading cached records from extracted-dataset-cache.pkl | icevision.parsers.parser:parse:113
Traceback (most recent call last):
File "code21.py", line 293, in
show_records(train_records[1:4], ncols=3,display_label=True)
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\visualize\show_data.py", line 151, in show_records
plot_grid(partials, ncols=ncols, figsize=figsize, show=show)
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\utils\imageio.py", line 105, in plot_grid
f(ax=ax)
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\imports.py", line 86, in call
return self.partial(*args, **kwargs)
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\visualize\show_data.py", line 56, in show_record
img = draw_record(
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\visualize\draw_data.py", line 345, in draw_record
return draw_sample(
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\visualize\draw_data.py", line 160, in draw_sample
img = draw_bbox(img=img, bbox=bbox, color=color)
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\visualize\draw_data.py", line 423, in draw_bbox
color = as_rgb_tuple(color)
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\icevision\visualize\utils.py", line 47, in as_rgb_tuple
return tuple(x.astype(np.int))
File "C:\Users\Madil2.conda\envs\new\lib\site-packages\numpy_init
.py", line 305, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module 'numpy' has no attribute 'int'.
np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations


Thanks

@aforadil aforadil added documentation Improvements or additions to documentation example request good first issue Good for newcomers help wanted Extra attention is needed labels Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation example request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant