AllenDowney / ThinkDSP

Think DSP: Digital Signal Processing in Python, by Allen B. Downey.
https://allendowney.github.io/ThinkDSP/
3.93k stars 3.2k forks source link

Lack of an import in cacophony.py #31

Closed vinniec closed 7 years ago

vinniec commented 7 years ago

The file is this: ThinkDSP/code/cacophony.ipynb While in python2 the reduce function is already present in python3 you have to import it through functools. By adding "from functools import reduce" at the beginning of the code, It will work for both py2 and py3

P.s. thanks for you books

AllenDowney commented 7 years ago

Fixed. Thanks very much!