提交 c2ee569c authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Python 2.4 compatibility fixes

上级 8d431c50
......@@ -308,8 +308,14 @@ class Cholesky(Op):
def __eq__(self, other):
return (type(self)==type(other) and self.props() == other.props())
def __repr__(self):
lu=('lower' if self.lower else 'upper')
destr=('destructive' if self.destructive else 'non-destructive')
if self.lower:
lu = 'lower'
else:
lu = 'upper'
if self.destructive:
destr = 'destructive'
else:
destr = 'non-destructive'
return 'Cholesky{%s,%s}'% (lu,destr)
def make_node(self, x):
x = as_tensor_variable(x)
......
......@@ -22,6 +22,7 @@ from theano import tensor #do not use, there is an import * below that hides i
from theano import tensor as T #ugly but works for now...
from theano.tensor import TensorType, inplace
from theano.gof import Env
from theano.gof.python25 import any, all
from theano.tensor.elemwise import DimShuffle
from theano import pprint, shared
from theano.tests import unittest_tools as utt
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论