From 75ffe0c37aca19b8ca28853b2d8d7e696cd2e830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Mon, 26 Jan 2015 10:55:25 +0100 Subject: [PATCH] Some changes to be actual to Python2.7 --- pylot/core/pick/CharFuns.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/pylot/core/pick/CharFuns.py b/pylot/core/pick/CharFuns.py index 64c4f06e..d52b7898 100644 --- a/pylot/core/pick/CharFuns.py +++ b/pylot/core/pick/CharFuns.py @@ -155,7 +155,7 @@ class CharacteristicFunction(object): stop = self.cut[1] / self.dt zz = self.orig_data.copy() z1 = zz[0].copy() - zz[0].data = z1.data[start:stop] + zz[0].data = z1.data[int(start):int(stop)] data = zz return data elif len(self.orig_data) == 2: @@ -171,8 +171,8 @@ class CharacteristicFunction(object): hh = self.orig_data.copy() h1 = hh[0].copy() h2 = hh[1].copy() - hh[0].data = h1.data[start:stop] - hh[1].data = h2.data[start:stop] + hh[0].data = h1.data[int(start):int(stop)] + hh[1].data = h2.data[int(start):int(stop)] data = hh return data elif len(self.orig_data) == 3: @@ -189,9 +189,9 @@ class CharacteristicFunction(object): h1 = hh[0].copy() h2 = hh[1].copy() h3 = hh[2].copy() - hh[0].data = h1.data[start:stop] - hh[1].data = h2.data[start:stop] - hh[2].data = h3.data[start:stop] + hh[0].data = h1.data[int(start):int(stop)] + hh[1].data = h2.data[int(start):int(stop)] + hh[2].data = h3.data[int(start):int(stop)] data = hh return data else: @@ -263,10 +263,9 @@ class HOScf(CharacteristicFunction): #Initialisation #t2: long term moving window - ilta = round(self.getTime2() / self.getIncrement()) + ilta = int(round(self.getTime2() / self.getIncrement())) lta = y[0] lta1 = y1[0] - #moving windows LTA = np.zeros(len(xnp)) for j in range(0, len(xnp)):