arte/time_series/time_series.py
def _apply(self, func, times=None, *args, **kwargs):
        '''Extract data and apply the passed function'''
        data = self.get_data(*args, **kwargs)
        if times is None:
            result = func(data)
        else:
            idxs = np.array(np.arange(times[0], times[1]) / self.__delta_time,
                            dtype='int32')
            result = func(data[idxs])
        return result
Extract data and apply the passed function
Extract data and apply the passed function
Extract data and apply the passed function
def _apply(self, func, times=None, *args, **kwargs):
        data = self.get_data(*args, **kwargs)
        if times is None:
            result = func(data)
        else:
            idxs = np.array(np.arange(times[0], times[1]) / self.__delta_time,
                            dtype='int32')
            result = func(data[idxs])
        return result
def _apply ( self , func , times = None , * args , ** kwargs ) : data = self . get_data ( * args , ** kwargs ) if times is None : result = func ( data ) else : idxs = np . array ( np . arange ( times [ 0 ] , times [ 1 ] ) / self . __delta_time , dtype = 'int32' ) result = func ( data [ idxs ] ) return result
Extract data and apply the passed function
Extract data and apply the passed function
'''Extract data and apply the passed function'''
self
func
times