mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-01 15:52:39 +02:00
Fixed cPickle import for Python 3
This commit is contained in:
parent
3451149427
commit
7bdb6ee556
1 changed files with 6 additions and 1 deletions
|
|
@ -5,7 +5,6 @@ import copy
|
|||
import numpy as np
|
||||
import GPy
|
||||
import scipy.io
|
||||
import cPickle as pickle
|
||||
import zipfile
|
||||
import tarfile
|
||||
import datetime
|
||||
|
|
@ -20,6 +19,12 @@ try:
|
|||
except ImportError:
|
||||
ipython_available=False
|
||||
|
||||
try:
|
||||
#In Python 2, cPickle is faster. It does not exist in Python 3 but the underlying code is always used
|
||||
#if available
|
||||
import cPickle as pickle
|
||||
except ImportError:
|
||||
import pickle
|
||||
|
||||
import sys, urllib2
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue