提交 dfb7afd2 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Minor fixes.

上级 43edc047
...@@ -1400,7 +1400,9 @@ class Mod(BinaryScalarOp): ...@@ -1400,7 +1400,9 @@ class Mod(BinaryScalarOp):
return (5,) return (5,)
def c_support_code(self): def c_support_code(self):
#We use a macro as python use % as a special string caractere. # We use a macro as python use % as a special string character,
# and the output of c_code may be run through another level
# of string formatting.
return "#define THEANO_MACRO_MOD(x,y) (x % y)" return "#define THEANO_MACRO_MOD(x,y) (x % y)"
def c_code(self, node, name, (x, y), (z, ), sub): def c_code(self, node, name, (x, y), (z, ), sub):
...@@ -1437,7 +1439,7 @@ class Mod(BinaryScalarOp): ...@@ -1437,7 +1439,7 @@ class Mod(BinaryScalarOp):
elif str(t) in imap(str, complex_types): elif str(t) in imap(str, complex_types):
raise self.complex_error raise self.complex_error
else: else:
raise NotImplementedError('type not supported', type) raise NotImplementedError('type not supported', t)
return """ return """
if (%(x)s < 0){ if (%(x)s < 0){
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论