minimal_pairs

sunpy.util.minimal_pairs(one, other)[source] [edit on github]

Find pairs of values in one and other with minimal distance. Assumes one and other are sorted in the same sort sequence.

Parameters:other (one,) – Sequence of scalars to find pairs from.
Returns:tuple – Pairs of values in one and other with minimal distance