-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: remove numpy deprecations #7
Conversation
fix: remove numpy deprecations in root shap fix: remove numpy deprecations in nested dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general.
But there seems to be a couple more (in the notebooks) that the original PR missed. Shall we fix these too?
Secondly, I noticed that np.bool8
is also getting deprecated in numpy 1.24, I thought we might take this chance to also fix it here if it's not too troublesome.
There's >>> import numpy as np; np.__version__
'1.24.3'
>>> np.object
<stdin>:1: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/xxx/forks/shap/venv/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated alias for the builtin `object`. To avoid this error in existing code, use `object` by itself. Doing this will not modify any behavior and is safe.
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 |
579c343
to
c21c80b
Compare
Good spot! I think that's all of them |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to mention / link a couple more related issues about the same topic:
|
Fixes deprecation warnings as per shap#1890