Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -25,8 +25,8 @@ def sqd_yin(samples): · 24 unmodified lines | |||
| 25 | W = B//2 | 25 | W = B//2 |
| 26 | yin = np.zeros(W) | 26 | yin = np.zeros(W) |
| 27 | for j in range(W): | 27 | for j in range(W): |
| 28 | for tau in range(1, W): | 28 | for tau in range(1, W): |
| 29 | yin[tau] += (samples[j] - samples[j+tau])**2 | 29 | yin[tau] += (samples[j] - samples[j+tau])**2 |
| 30 | return yin | 30 | return yin |
| 31 | 31 | ||
| 32 | def sqd_yinfast(samples): | 32 | def sqd_yinfast(samples): |