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

replacing np.int and similar aliases to support latest np versions #964

Open
rlleshi opened this issue May 26, 2023 · 1 comment
Open

replacing np.int and similar aliases to support latest np versions #964

rlleshi opened this issue May 26, 2023 · 1 comment
Assignees
Labels
type: bug Something isn't working

Comments

@rlleshi
Copy link

rlleshi commented May 26, 2023

Describe the bug
numpy.int, numpy.float, and similar aliases are deprecated since numpy 1.20. As of v1.24, they raise an error.

Was just wondering when is it planned to replace the aliases with the alternatives mentioned in the release notes 1.20?

To Reproduce

from dataprep.eda import *

Throws:

AttributeError                            Traceback (most recent call last)
Cell In[1], line 2
      1 import pandas as pd
----> 2 from dataprep.eda import *
      3 from dataprep.eda import plot, plot_correlation, plot_missing, plot_diff, create_report

File [~/.local/share/virtualenvs/lib/python3.11/site-packages/dataprep/eda/__init__.py:8](https://file+.vscode-resource.vscode-cdn.net/home/rejnald/projects/notebooks/~/.local/share/virtualenvs/recommender-u4VyfX_H/lib/python3.11/site-packages/dataprep/eda/__init__.py:8)
      5 from bokeh.io import output_notebook
      7 from ..utils import is_notebook
----> 8 from .correlation import compute_correlation, plot_correlation, render_correlation
      9 from .create_report import create_report
     10 from .create_diff_report import create_diff_report

File [~/.local/share/virtualenvs/recommender-u4VyfX_H/lib/python3.11/site-packages/dataprep/eda/correlation/__init__.py:13](https://file+.vscode-resource.vscode-cdn.net/home/rejnald/projects/recommender/notebooks/~/.local/share/virtualenvs/recommender-u4VyfX_H/lib/python3.11/site-packages/dataprep/eda/correlation/__init__.py:13)
     11 from ..container import Container
     12 from ...progress_bar import ProgressBar
---> 13 from .compute import compute_correlation
     14 from .render import render_correlation
     16 __all__ = ["render_correlation", "compute_correlation", "plot_correlation"]

File [~/.local/share/virtualenvs/recommender-u4VyfX_H/lib/python3.11/site-packages/dataprep/eda/correlation/compute/__init__.py:8](https://file+.vscode-resource.vscode-cdn.net/home/rejnald/projects/recommender/notebooks/~/.local/share/virtualenvs/recommender-u4VyfX_H/lib/python3.11/site-packages/dataprep/eda/correlation/compute/__init__.py:8)
      5 from warnings import catch_warnings, filterwarnings
      7 from ...configs import Config
----> 8 from ...intermediate import Intermediate
...

AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
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
@rlleshi rlleshi added the type: bug Something isn't working label May 26, 2023
@vtharmalingam
Copy link

This has totally blocked my trying out this beautiful & promising solution on my env wherein I had to hard fix py3.11 and given pandas and numpy versions. Hope this gets resolved soon!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants