Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@paulbkoch
Copy link
Contributor

Overview

Description of the changes proposed in this pull request:

Resolves the error:

AttributeError: np.obj2sctype was removed in the NumPy 2.0 release. Use np.dtype(obj).type instead.

@CloseChoice
Copy link
Collaborator

CloseChoice commented Jun 22, 2024

Thanks for the PR and great that you found this. Will merge if our pipelines succeed

@CloseChoice CloseChoice mentioned this pull request Jun 22, 2024
8 tasks
@connortann
Copy link
Collaborator

connortann commented Jun 24, 2024

Thanks for the PR! I have merged the master branch into your feature branch; the CI should hopefully pass now.

I was initially surprised that this issue was not picked up by the NPY201 linting rule that picks up deprecated functions; but, I realise we have explicitly excluded this _colorconv.py from linting as it is vendored code. So, thanks for spotting this.

@connortann connortann added the dependencies Pull requests that update a dependency file label Jun 24, 2024
@connortann connortann merged commit 07aaaab into shap:master Jun 24, 2024
@connortann connortann added this to the 0.46.0 milestone Jun 26, 2024
@jonathanng
Copy link

jonathanng commented Aug 4, 2024

Anyone else seeing this error now?

/shap/plots/colors/_colorconv.py:819: DeprecationWarning: Converting `np.inexact` or `np.floating` to a dtype is deprecated. The current result is `float64` which is not strictly correct.
  if np.issubdtype(dtype_in, np.dtype(dtype).type):

@jonathanng
Copy link

I'm using numpy==1.26.4.

@connortann
Copy link
Collaborator

@jonathanng thanks for the bug report! That looks like a separate issue, so let's track that over at #3782

@connortann connortann added the bug Indicates an unexpected problem or unintended behaviour label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Indicates an unexpected problem or unintended behaviour dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants