Skip to content

Commit

Permalink
Check type when updating node_flux index.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjhn authored Oct 26, 2023
1 parent 8187630 commit ecf70fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion share/lib/python/neuron/rxd/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _replace(old_offset, old_nseg, new_offset, new_nseg):
_states = numpy.delete(_states, list(range(start, stop)))

# update _node_flux index
for i, (idx, typ) in enumerate(_node_fluxes["index"], _node_fluxes["type"]):
for i, (idx, typ) in enumerate(zip(_node_fluxes["index"], _node_fluxes["type"])):
if typ == -1 and idx in dels:
j = int(((idx + 0.5) / new_nseg) * old_nseg)
_node_fluxes["index"][i] = j
Expand Down

0 comments on commit ecf70fc

Please sign in to comment.