mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-21 14:05:14 +02:00
Update __init__.py
This commit is contained in:
parent
0d74681ee2
commit
c7c18f0437
1 changed files with 6 additions and 5 deletions
|
|
@ -55,11 +55,12 @@ def load(file_or_path):
|
|||
str = str
|
||||
unicode = unicode
|
||||
bytes = str
|
||||
basestring = basestring try:
|
||||
import cPickle as pickle
|
||||
if isinstance(file_or_path, basestring):
|
||||
with open(file_or_path, 'rb') as f:
|
||||
m = pickle.load(f)
|
||||
basestring = basestring
|
||||
try:
|
||||
import cPickle as pickle
|
||||
if isinstance(file_or_path, basestring):
|
||||
with open(file_or_path, 'rb') as f:
|
||||
m = pickle.load(f)
|
||||
else:
|
||||
m = pickle.load(file_or_path)
|
||||
except:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue