import numpy as np from typing import List def dft( a: List[ float ] ) -> List[ float ]: return [ i for i, v in enumerate( np.abs( np.fft.rfft( a ) ) ) if not np.isclose( v, 0 ) ] import run_tests