From: W. Trevor King Date: Sun, 18 Nov 2012 22:33:42 +0000 (-0500) Subject: FFT_tools: use // for explicit integer (floor) division (PEP238) X-Git-Tag: 0.4~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=aa190e5ce2d61a41586b850f330850102ea59ac7;p=FFT-tools.git FFT_tools: use // for explicit integer (floor) division (PEP238) // has been supported since Python 2.2. / changed to float division in Python 3. --- diff --git a/FFT_tools.py b/FFT_tools.py index 78c4e29..7df0dbe 100644 --- a/FFT_tools.py +++ b/FFT_tools.py @@ -561,7 +561,7 @@ def avg_power_spectrum(data, freq=1.0, chunk_size=2048, raise ValueError( 'chunk_size {} should be a power of 2'.format(chunk_size)) - nchunks = len(data)/chunk_size # integer division = implicit floor + nchunks = len(data)//chunk_size # integer division = implicit floor if overlap: chunk_step = chunk_size/2 else: