pint.utils.group_iterator
- pint.utils.group_iterator(items)[source]
An iterator to step over identical items in a
numpy.ndarray
Example
This will step over all of the observatories in the TOAs. For each iteration it gives the observatory name and the indices that correspond to it:
>>> t = pint.toa.get_TOAs("grouptest.tim") >>> for o, i in group_iterator(t["obs"]): >>> print(f"{o} {i}")