AllenDowney/ThinkDSP

Lack of an import in cacophony.py

vinniec opened this issue · 1 comments

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

Fixed. Thanks very much!