pyscf / pyscf-forge

pyscf-forge is a staging ground for code that may be suitable for pyscf-core
Apache License 2.0
27 stars 23 forks source link

check integer correctly to account for pyscf #2377 #66

Closed MatthewRHermes closed 2 months ago

MatthewRHermes commented 2 months ago

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

fishjojo commented 2 months ago

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

MatthewRHermes commented 2 months ago

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 commented 2 months ago

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 commented 2 months ago

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.