From aa190e5ce2d61a41586b850f330850102ea59ac7 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 18 Nov 2012 17:33:42 -0500 Subject: [PATCH] FFT_tools: use // for explicit integer (floor) division (PEP238) // has been supported since Python 2.2. / changed to float division in Python 3. --- FFT_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.26.2