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

check integer correctly to account for pyscf #2377 #66

Merged
merged 3 commits into from
Sep 18, 2024

Conversation

MatthewRHermes
Copy link
Collaborator

@MatthewRHermes MatthewRHermes commented Sep 9, 2024

isinstance (*, int) -> isinstance (*, (int, np.integer))

isinstance (*, int) -> isinstance (*, (int, np.integer))
@fishjojo
Copy link
Collaborator

fishjojo commented Sep 9, 2024

There is a function isinteger in lib.misc that we can use.

@MatthewRHermes
Copy link
Collaborator Author

I wanted to update the github-actions to validate that I didn't miss anything but I really can't at this point due to #67

@MatthewRHermes MatthewRHermes changed the title numpy 2.0 safety: int vs np.integer check integer correctly Sep 10, 2024
@MatthewRHermes
Copy link
Collaborator Author

MatthewRHermes commented Sep 10, 2024

Changed the title because on closer inspection I don't think this is a numpy 2.0 thing. Not sure what it is but it was a problem on my machines (python 3.9.19, numpy 1.24.3 and python 3.8.5, numpy 1.23.5).

@MatthewRHermes MatthewRHermes changed the title check integer correctly check integer correctly to account for pyscf #2377 Sep 12, 2024
@MatthewRHermes
Copy link
Collaborator Author

OK, figured out why this became a problem for me now: pyscf #2377 changed the data type of libxc.XC_CODES.values () from native Python integer to numpy.intc in order to interface with libxc functional keyword parsing. The reason the github actions isn't catching this is, as in #67, we need the PySCF 2.7 release in order to see the effects of pyscf #2377.

@MatthewRHermes MatthewRHermes merged commit 73e5ffa into pyscf:master Sep 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants