Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Update python/mxnet/base.py
Browse files Browse the repository at this point in the history
Co-authored-by: Sheng Zha <[email protected]>
  • Loading branch information
yajiedesign and szha authored Sep 27, 2020
1 parent d76b703 commit 47e1ffd
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions python/mxnet/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,13 +276,10 @@ class MXCallbackList(ctypes.Structure):
def _load_lib():
"""Load library by searching possible path."""
lib_path = libinfo.find_lib_path()
if sys.version_info >= (3, 8):
if os.name == "nt":
# use LOAD_WITH_ALTERED_SEARCH_PATH, For simplicity, let's just fill the numbers.
# pylint: disable=E1123
lib = ctypes.CDLL(lib_path[0], winmode=0x00000008)
else:
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
if sys.version_info >= (3, 8) and os.name == "nt":
# use LOAD_WITH_ALTERED_SEARCH_PATH, For simplicity, let's just fill the numbers.
# pylint: disable=E1123
lib = ctypes.CDLL(lib_path[0], winmode=0x00000008)
else:
lib = ctypes.CDLL(lib_path[0], ctypes.RTLD_LOCAL)
# DMatrix functions
Expand Down

0 comments on commit 47e1ffd

Please sign in to comment.