10 Nov
2022
10 Nov
'22
6:01 p.m.
# sample something made of sinusoids at funny offsets, using a different approach for testing def sample_sinusoids_funny(data, fractional_indices): angle_ratios = fractional_indices / data.shape[-1] return [ ((np.exp(2j * sample_idx * np.pi * np.fft.fftfreq(len(data)))) * np.fft.fft(data)).sum() / len(data) for sample_idx in fractional_indices] ] first i'll test it in function form, then try to redo the upsampling at half rate