コード例 #1
0
ファイル: basic.py プロジェクト: mgorny/aesara
 def perform(self, node, inputs, outputs):
     (x, index, toInsert) = inputs
     (out, ) = outputs
     if not self.inplace:
         out[0] = list(x)
     else:
         out[0] = x
     # need to copy toAppend due to destroy_handler limitation
     toInsert = _lessbroken_deepcopy(toInsert)
     out[0].insert(index, toInsert)
コード例 #2
0
ファイル: basic.py プロジェクト: mgorny/aesara
 def perform(self, node, inputs, outputs):
     (x, toAppend) = inputs
     (out, ) = outputs
     if not self.inplace:
         out[0] = list(x)
     else:
         out[0] = x
     # need to copy toAppend due to destroy_handler limitation
     if toAppend:
         o = out[0]
         for i in toAppend:
             o.append(_lessbroken_deepcopy(i))
コード例 #3
0
ファイル: basic.py プロジェクト: mgorny/aesara
 def perform(self, node, inputs, outputs):
     (out, ) = outputs
     # We need to make sure that we don't get a view on our inputs
     out[0] = [_lessbroken_deepcopy(inp) for inp in inputs]