
Dec. 3, 2015
10:39 a.m.
On 2015/12/02 10:45 PM, Manolo Martínez wrote:
1) this func sorts the absolute value of the amplitudes to find the two most important components, and this seems overkill for large vectors.
Try inds = np.argpartition(-np.abs(ft), 2)[:2] Now inds holds the indices of the two largest components. Eric