def num_frames(self, num_samples):
        """
        Return the number of frames that will be used for a signal with the length of ``num_samples``.
        """
        return math.ceil(float(max(num_samples - self.frame_size, 0)) / float(self.hop_size)) + 1
def num_frames ( self , num_samples ) : return math . ceil ( float ( max ( num_samples - self . frame_size , 0 ) ) / float ( self . hop_size ) ) + 1
Return the number of frames that will be used for a signal with the length of ``num_samples``.