def bearing(self, format='numeric'):
        """Calculate bearing between locations in segments.

        Args:
            format (str): Format of the bearing string to return

        Returns:
            list of list of float: Groups of bearings between points in
                segments
        """
        bearings = []
        for segment in self:
            if len(segment) < 2:
                bearings.append([])
            else:
                bearings.append(segment.bearing(format))
        return bearings
Calculate bearing between locations in segments.

        Args:
            format (str): Format of the bearing string to return

        Returns:
            list of list of float: Groups of bearings between points in
                segments