Skip to content

Commit

Permalink
Merge pull request #41 from JangidBhavnesh/master
Browse files Browse the repository at this point in the history
np version check fix
  • Loading branch information
MatthewRHermes authored Oct 9, 2023
2 parents f2b772d + 83eb090 commit ae5125d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/helper.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import sys, os
import numpy


def version_tuple(version):
return tuple(map(int, version.split('.')))[:2]


''' This bit copied from PySCF '''
def load_library(libname):
# numpy 1.6 has bug in ctypeslib.load_library, see numpy/distutils/misc_util.py
if '1.6' in numpy.__version__:
if version_tuple(numpy.__version__) == version_tuple('1.6.2'):
if (sys.platform.startswith('linux') or
sys.platform.startswith('gnukfreebsd')):
so_ext = '.so'
Expand Down

0 comments on commit ae5125d

Please sign in to comment.