Skip to content

Commit

Permalink
Use zip instead of izip in the spatialstateupdate.py_ template …
Browse files Browse the repository at this point in the history
…for Python3-compatibility
  • Loading branch information
mstimberg committed Mar 11, 2015
1 parent d01c667 commit 4c7c89b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
Solves the cable equation (spatial diffusion of currents).
This is where most time-consuming time computations are done.
'''
from itertools import izip

from scipy.linalg import solve_banded
from numpy.linalg import solve
from numpy import zeros
Expand Down Expand Up @@ -50,7 +48,7 @@ ab[1,:]-=_gtot
_n_segments = len({{_B}})
{{_B}}[:] = 0
{{_P}}[:] = 0
for _i, _i_parent, _first, _last, _invr0, _invrn in izip({{_morph_i}},
for _i, _i_parent, _first, _last, _invr0, _invrn in zip({{_morph_i}},
{{_morph_parent_i}},
{{_starts}},
{{_ends}},
Expand All @@ -74,7 +72,7 @@ for _i, _i_parent, _first, _last, _invr0, _invrn in izip({{_morph_i}},
_V = solve({{_P}}.reshape((_n_segments, _n_segments)), {{_B}})

# Final solutions as linear combinations
for _i, _i_parent, _first, _last, in izip({{_morph_i}},
for _i, _i_parent, _first, _last, in zip({{_morph_i}},
{{_morph_parent_i}},
{{_starts}},
{{_ends}}):
Expand Down

0 comments on commit 4c7c89b

Please sign in to comment.