Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit f99b150

Browse files
authored
Merge pull request #369 from alberto-antonietti/fix_tm_example
fix tmevaluator to be Python3 compatible
2 parents 0561457 + 788f56b commit f99b150

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/tsodyksmarkramstp/tmevaluator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ def __init__(self, t, v, tstim, params):
5959
psp_start = np.searchsorted(t, tstim+offset)
6060
psp_stop = psp_start + window_samples
6161
psp_stop[-1] += 2*window_samples # Extend last psp window (RTR case)
62-
self.split_idx = zip(psp_start, psp_stop)
62+
self.split_idx = list(zip(psp_start, psp_stop))
6363
# Parameters to be optimized
6464
self.params = [bpop.parameters.Parameter(name, bounds=(minval, maxval))
6565
for name, minval, maxval in self.params]
6666
# Objectives
6767
self.objectives = [bpop.objectives.Objective('interval_%d' % (i,))
68-
for i in xrange(len(list(self.split_idx)))]
68+
for i in xrange(len(self.split_idx))]
6969

7070
def generate_model(self, individual):
7171
"""Calls numerical integrator `tmodeint.py` and returns voltage trace based on the input parameters"""

0 commit comments

Comments
 (0)