unique

sunpy.util.unique(itr, key=None)[source] [edit on github]

Return only unique elements of a sequence.

Parameters
  • itr (iterable) – Any iterable sequence.

  • key (function, optional) – A function to apply to each element in the iterable. Defaults to None.

Returns

set – A set of each unique element.