def energy(self, windowSize = 256):
        N = len(self)

        window = numpy.hamming(windowSize)
        window.shape = (windowSize, 1)
        
        n = N - windowSize #number of windowed samples.
    
        # Create a view of signal who's shape is (n, windowSize). Use stride_tricks such that each stide jumps only one item.
        p = numpy.power(self,2)
        s = stride_tricks.as_strided(p,shape=(n, windowSize), strides=(self.itemsize, self.itemsize))
        e = numpy.dot(s, window) / windowSize
        e.shape = (e.shape[0], )
        return e
Test if it list the files that belong to a package
dataset/ETHPy150Open jsawruk/pymir/pymir/Frame.py/Frame.energy--crossover with--dataset/ETHPy150Open saltstack/salt/tests/unit/modules/rpm_test.py/RpmTestCase.test_file_dict