-
Notifications
You must be signed in to change notification settings - Fork 30
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
np version check fix #41
Conversation
I don't think that quite works the way you want it to:
Should it just check that the first two elements of the tuple are exactly '1', '6'? |
BTW this is so old that the corresponding code no longer exists in PySCF itself, probably because the maintainers gave up on supporting numpy 1.6 |
**Current code fails for numpy version 1.21.6
I tried to overcome that by using above function. But clearly that doesn't seem the correct way.** With new commit, I think it will be overcome for any np version less than 1.6.2
I know this isn't the best way but it is solving the problem. If you have any other suggestion then please let me know. Thank you |
I think it was specifically 1.6 that had the bug, in fact at one point a PySCF warning recommended you downgrade if you had 1.6. Should it just check that the first two elements of the tuple are exactly '1', '6'? |
So, Instead of less than 1.6 version, I will make it for 1.6.x only.
How does this look? |
I don't think it's the clearest thing in the world when you define something called "version_tuple" that throws away part of the version tuple. Can you just index on the equality, rather than the function definition? It's less efficient but it's clearer to read. |
P.S. ignore my deleted comment, I wasn't looking closely enough before I sent that. |
Whatever I'll just do it myself |
The load_library(libname) function at https://github.com/MatthewRHermes/mrh/blob/master/lib/helper.py has a weird way of checking the np version. Like, if condition is becoming true if np version is 1.21.6.
In this PR, I am adding a fix to make it consistent so that this condition becomes true for the np version less than or equal to the 1.6.
Thank You