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
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
https://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to