11 Nov
2022
11 Nov
'22
3:01 a.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