@staticmethod
    def transform(samples, win_shape=numpy.hamming, pre_var=None):
        if not pre_var:
            pre_var = Spectrum.pre_calculate(len(samples), win_shape, False)
        frame = numpy.fft.rfft(pre_var.W * samples)
        return pre_var.WL / (frame.real**2 + frame.imag**2)
dataset/ETHPy150Open dongying/dear/dear/spectrum/dft.py/PowerSpectrum.transform/swapped operands of `/`