Skip to content

Commit

Permalink
Fixed most bugs with CodeObject being Nameable (still some doctests
Browse files Browse the repository at this point in the history
failing)
  • Loading branch information
thesamovar committed Aug 19, 2013
1 parent c3bcfa4 commit d6ffe8e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion brian2/groups/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def create_runner_codeobj(group, code, template_name, indices=None,
if variable_indices is None:
variable_indices = group.variable_indices

return create_codeobject(name,
return create_codeobject('%s_%s*' % (name, template_name),
code,
resolved_namespace,
variables,
Expand Down
2 changes: 1 addition & 1 deletion brian2/monitors/ratemonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def reinit(self):
np.dtype(type(self.clock.t))))

def pre_run(self, namespace):
self.codeobj = create_codeobject(self.name,
self.codeobj = create_codeobject('%s_ratemonitor*' % self.name,
'', # No model-specific code
{}, # no namespace
self.variables,
Expand Down
2 changes: 1 addition & 1 deletion brian2/monitors/spikemonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def reinit(self):
self.count = np.zeros(len(self.source), dtype=int)

def pre_run(self, namespace):
self.codeobj = create_codeobject(self.name,
self.codeobj = create_codeobject('%s_spikemonitor*' % self.name,
'', # No model-specific code
{}, # no namespace
self.variables,
Expand Down

0 comments on commit d6ffe8e

Please sign in to comment.