Closed ShmuelBenEzra closed 5 years ago
You are right. There is a simpler version of this function in the most recent version of the book:
def analyze2(ys, fs, ts):
args = np.outer(ts, fs)
M = np.cos(PI2 * args)
amps = np.dot(M, ys) / 2
return amps
No need for N
, so it avoids the issue.
def analyze2(ys, fs, ts)
N is not defined