Skip to content

Commit

Permalink
Another tweak to prevent choking on integer node IDs.
Browse files Browse the repository at this point in the history
  • Loading branch information
lebedov committed Dec 24, 2015
1 parent 6f91bdf commit f170f0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neurokernel/LPU/LPU.py
Original file line number Diff line number Diff line change
Expand Up @@ -481,8 +481,8 @@ def __init__(self, dt, n_dict, s_dict, input_file=None, output_file=None,
# For synapses whose post-synaptic site is another synapse, we set
# its post-id to be max_neuron_id + synapse_id. By doing so, we
# won't confuse synapse ID's with neurons ID's.
s_neu_post = [self.order[int(nid)] for nid in s['post'] if 'synapse' not in nid]
s_syn_post = [int(nid[8:])+self.nid_max for nid in s['post'] if 'synapse' in nid]
s_neu_post = [self.order[int(nid)] for nid in s['post'] if 'synapse' not in str(nid)]
s_syn_post = [int(nid[8:])+self.nid_max for nid in s['post'] if 'synapse' in str(nid)]
s['post'] = s_neu_post + s_syn_post

order = np.argsort(s['post']).astype(np.int32)
Expand Down

0 comments on commit f170f0a

Please sign in to comment.