Skip to content

Commit 046f7e8

Browse files
committed
MAINT NumPy 1.10-safe version comparisons in joblib
Cherry-picked from joblib/joblib@8e2d6dc
1 parent 67a0a91 commit 046f7e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sklearn/externals/joblib/numpy_pickle.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,8 @@ def read(self, unpickler):
107107
"Reconstruct the array"
108108
filename = os.path.join(unpickler._dirname, self.filename)
109109
# Load the array from the disk
110-
if unpickler.np.__version__ >= '1.3':
110+
np_ver = [int(x) for x in unpickler.np.__version__.split('.', 2)[:2]]
111+
if np_ver >= [1, 3]:
111112
array = unpickler.np.load(filename,
112113
mmap_mode=unpickler.mmap_mode)
113114
else:

0 commit comments

Comments
 (0)