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
Shap not compatible with numpy>=1.24.0 #2911
Comments
I am not sure about the version change in numpy Here are another problematic lines THose could be changed to something like following https://github.com/slundberg/shap/blob/master/shap/utils/_general.py#L159 Alias |
The incompatibility issue with numpy is still present (I am using the git-version of your package) 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 |
Replace |
Shap is currently incompatible with numpy versions >= 1.24.0 (see shap/shap#2911)
If the refactoring will take more time, at least it could be versioned a patch for shap with numpy < 1.24.0 as a dependency. This would provide a temporary fix, while the major refacing can be done. |
Since 1.24.0 numpy removed
np.bool
which will lead to various errors usingshap
repository.On my case I fixed
numpy
version to 1.23.0 to make it work.The text was updated successfully, but these errors were encountered: