mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-06-05 14:55:15 +02:00
Update __init__.py
This commit is contained in:
parent
6b6938bd11
commit
d1f4af7ec2
1 changed files with 3 additions and 2 deletions
|
|
@ -46,9 +46,10 @@ def load(file_or_path):
|
|||
import cPickle as pickle
|
||||
if isinstance(file_or_path, basestring):
|
||||
with open(file_or_path, 'rb') as f:
|
||||
m = pickle.load(f)
|
||||
u = pickle._Unpickler(f)
|
||||
u.encoding = 'latin1'
|
||||
m = u.load()
|
||||
else:
|
||||
m = pickle.load(file_or_path)
|
||||
except:
|
||||
import pickle
|
||||
if isinstance(file_or_path, str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue