Skip to content

Commit

Permalink
Copy HostSendNode x value to work with new Nengo
Browse files Browse the repository at this point in the history
We used to do this copy in Nengo, now we don't, so need to copy here.
  • Loading branch information
hunse committed Nov 11, 2019
1 parent 8d1dfb4 commit 6f01f9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nengo_loihi/builder/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, dimensions, label=Default, check_output=False):

def update(self, t, x):
assert len(self.queue) == 0 or t > self.queue[-1][0]
self.queue.append((t, x))
self.queue.append((t, x.copy()))


class HostReceiveNode(Node):
Expand All @@ -42,6 +42,7 @@ def update(self, t):
return x

def receive(self, t, x):
# we assume that x will not be mutated (i.e. we do not need to copy)
self.queue.append((t, x))


Expand Down

0 comments on commit 6f01f9a

Please sign in to comment.