projects
/
FFT-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ca7cd3f
)
FFT_tools: use // for explicit integer (floor) division (PEP238)
author
W. Trevor King
<wking@tremily.us>
Sun, 18 Nov 2012 22:33:42 +0000
(17:33 -0500)
committer
W. Trevor King
<wking@tremily.us>
Sun, 18 Nov 2012 22:33:45 +0000
(17:33 -0500)
// has been supported since Python 2.2. / changed to float division
in Python 3.
FFT_tools.py
patch
|
blob
|
history
diff --git
a/FFT_tools.py
b/FFT_tools.py
index 78c4e29b97c0faef3ebed2fc0b4717d3c3348629..7df0dbe5c9d3b00fb61fbc518c2c85381b90ec1b 100644
(file)
--- 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: