提交 127dca84 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

merge

......@@ -80,7 +80,8 @@ represents an expression *result*.
Here we declare a Method. The three arguments are as follow:
* **inputs**: a list of input Variables
* **outputs**: a list of output Variables
* **outputs**: a list of output Variables, or ``None``. ``None`` is equivalent
to returning an empty list of outputs.
* **updates**: a dictionary mapping member Variables to Variables. When we
call the function that this Method compiles to, it will replace (update) the
values associated with the member Variables.
......
......@@ -792,7 +792,6 @@ def function(inputs, outputs, mode=None, accept_inplace = False):
"""
mode = mode if mode is not None else mode_module.default_mode
print >> sys.stderr, "INFO: compiling function with mode", mode
inputs = map(convert_function_input, inputs)
if outputs is None:
......
......@@ -149,7 +149,6 @@ class Component(object):
memo = {}
self.allocate(memo)
rval = self.build(mode, memo)
print >> sys.stderr, "INFO: compiling component with mode", mode
return rval
def make(self, *args, **kwargs):
......@@ -348,6 +347,8 @@ class Method(Component):
"""
super(Method, self).__init__()
if outputs is None:
outputs = []
self.inputs = inputs
self.outputs = outputs
self.updates = dict(updates)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论