提交 a7e855b6 authored 作者: Dumitru Erhan's avatar Dumitru Erhan

Cosmetic changes to imports: using gof.python25, where the check for python version is made

上级 a04695a4
...@@ -8,8 +8,7 @@ import cPickle ...@@ -8,8 +8,7 @@ import cPickle
import sys, time, copy import sys, time, copy
if sys.version_info[:2] >= (2,5): from theano.gof.python25 import partial
from functools import partial
import numpy import numpy
import theano.gof import theano.gof
......
...@@ -10,11 +10,7 @@ from theano import gof ...@@ -10,11 +10,7 @@ from theano import gof
from theano.printing import pprint from theano.printing import pprint
import io, sys import io, sys
if sys.version_info[:2] >= (2,5): from theano.gof.python25 import any, all, defaultdict, partial
from functools import partial
from collections import defaultdict
else:
from theano.gof.python25 import any, all, defaultdict, partial
from itertools import chain from itertools import chain
......
...@@ -65,7 +65,7 @@ else: ...@@ -65,7 +65,7 @@ else:
import __builtin__ import __builtin__
all = __builtin__.all all = __builtin__.all
any = __builtin__.any any = __builtin__.any
import functools import functools, collections
partial = functools.partial partial = functools.partial
defaultdict = collections.defaultdict
__all__ = ['all', 'any'] __all__ = ['all', 'any']
import sys import sys
if sys.version_info[:2] >= (2,5): from theano.gof.python25 import partial
from functools import partial
else:
from theano.gof.python25 import partial
import graph import graph
......
...@@ -6,8 +6,6 @@ import __builtin__ ...@@ -6,8 +6,6 @@ import __builtin__
import sys # for sys.maxint import sys # for sys.maxint
from theano.configparser import config, AddConfigVar, BoolParam from theano.configparser import config, AddConfigVar, BoolParam
import traceback #for overriding Op.__call__ import traceback #for overriding Op.__call__
if sys.version_info >= (2,5):
import functools
import numpy, theano import numpy, theano
#from copy import copy as python_copy #from copy import copy as python_copy
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论