summaryrefslogtreecommitdiff
path: root/pyspike/DiscreteFunc.py
diff options
context:
space:
mode:
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>2015-12-13 10:57:12 +0100
committerIgor Gnatenko <i.gnatenko.brain@gmail.com>2015-12-14 01:33:11 +0100
commit2c42e59e5097d3b9745e6eae2bee8f1ff27f7e09 (patch)
treea553a478a6cc1dcc99d80653c2f6eb08766c922d /pyspike/DiscreteFunc.py
parenteeb4918ec2181f136e85bce976ec46a35a74b8f1 (diff)
py3: xrange() -> range()
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Diffstat (limited to 'pyspike/DiscreteFunc.py')
-rw-r--r--pyspike/DiscreteFunc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pyspike/DiscreteFunc.py b/pyspike/DiscreteFunc.py
index 55c0bc8..fe97bc2 100644
--- a/pyspike/DiscreteFunc.py
+++ b/pyspike/DiscreteFunc.py
@@ -80,7 +80,7 @@ class DiscreteFunc(object):
expected_mp = (averaging_window_size+1) * int(self.mp[0])
y_plot = np.zeros_like(self.y)
# compute the values in a loop, could be done in cython if required
- for i in xrange(len(y_plot)):
+ for i in range(len(y_plot)):
if self.mp[i] >= expected_mp:
# the current value contains already all the wanted
@@ -244,7 +244,7 @@ def average_profile(profiles):
assert len(profiles) > 1
avrg_profile = profiles[0].copy()
- for i in xrange(1, len(profiles)):
+ for i in range(1, len(profiles)):
avrg_profile.add(profiles[i])
avrg_profile.mul_scalar(1.0/len(profiles)) # normalize