diff --git a/neo/core/analogsignal.py b/neo/core/analogsignal.py index 1e484c916..67badec72 100644 --- a/neo/core/analogsignal.py +++ b/neo/core/analogsignal.py @@ -553,7 +553,7 @@ def time_slice(self, t_start, t_stop): ''' # checking start time and transforming to start index - if t_start == None: + if t_start is None: i = 0 else: t_start = t_start.rescale(self.sampling_period.units) @@ -561,7 +561,7 @@ def time_slice(self, t_start, t_stop): i = int(np.rint(i.magnitude)) # checking stop time and transforming to stop index - if t_stop == None: + if t_stop is None: j = len(self) else: t_stop = t_stop.rescale(self.sampling_period.units)