提交 8d8ab48e authored 作者: James Bergstra's avatar James Bergstra

80char / pep8

上级 4848c601
......@@ -272,7 +272,8 @@ class CLinkerOp(CLinkerObject):
- `MethodNotDefined`: Subclass does not implement this method
"""
raise utils.MethodNotDefined("c_support_code_apply", type(self), self.__class__.__name__)
raise utils.MethodNotDefined("c_support_code_apply",
type(self), self.__class__.__name__)
class PureOp(object):
......
......@@ -1206,12 +1206,15 @@ class Mod(BinaryScalarOp):
def c_code(self, node, name, (x, y), (z, ), sub):
"""
We want the result to have the same sign as python, not the other implementation of mod.
We want the result to have the same sign as python, not the other
implementation of mod.
"""
#raise NotImplementedError("Unlike Python, C's modulo returns negative modulo on negative dividend (to implement)")
# raise NotImplementedError("Unlike Python, C's modulo returns negative
# modulo on negative dividend (to implement)")
t = node.inputs[0].type.upcast(*[ i.type for i in node.inputs[1:]])
if (str(t) in imap(str, discrete_types) or
t in ['uint8','int8','uint16','int16','uint32','int32','uint64','int64'] or
t in ['uint8','int8','uint16','int16'] or
t in ['uint32','int32','uint64','int64'] or
t in discrete_types):
# The above or's should not be needed anymore. However, for now we
# keep them out of safety, and verify they are useless with an
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论