traffic/core/flight.py
def split(  # noqa: F811
        self, value: Union[int, str] = 10, unit: Optional[str] = None
    ) -> Iterator["Flight"]:
        """Iterates on legs of a Flight based on the distrution of timestamps.

        By default, the method stops a flight and yields a new one after a gap
        of 10 minutes without data.

        The length of the gap (here 10 minutes) can be expressed:

        - in the NumPy style: ``Flight.split(10, 'm')`` (see
          ``np.timedelta64``);
        - in the pandas style: ``Flight.split('10T')`` (see ``pd.Timedelta``)

        """
        if isinstance(value, int) and unit is None:
            # default value is 10 m
            unit = "m"

        for data in _split(self.data, value, unit):
            yield self.__class__(data)
Iterates on legs of a Flight based on the distrution of timestamps.

        By default, the method stops a flight and yields a new one after a gap
        of 10 minutes without data.

        The length of the gap (here 10 minutes) can be expressed:

        - in the NumPy style: ``Flight.split(10, 'm')`` (see
          ``np.timedelta64``);
        - in the pandas style: ``Flight.split('10T')`` (see ``pd.Timedelta``)

        
Iterates on legs of a Flight based on the distrution of timestamps.
By default, the method stops a flight and yields a new one after a gap
of 10 minutes without data.

The length of the gap (here 10 minutes) can be expressed.


Iterates on legs of a Flight based on the distrution of timestamps . By default the method stops a flight and yields a new one after a gap of 10 minutes without data . The length of the gap ( here 10 minutes ) can be expressed .
def split(  
        self, value: Union[int, str] = 10, unit: Optional[str] = None
    ) -> Iterator["Flight"]:
        if isinstance(value, int) and unit is None:
            unit = "m"
        for data in _split(self.data, value, unit):
            yield self.__class__(data)
def split ( self , value : Union [ int , str ] = 10 , unit : Optional [ str ] = None ) -> Iterator [ "Flight" ] : if isinstance ( value , int ) and unit is None : unit = "m" for data in _split ( self . data , value , unit ) : yield self . __class__ ( data )
Iterates on legs of a Flight based on the distrution of timestamps.
Iterates on legs of a Flight based on the distrution of timestamps .
# noqa: F811 """Iterates on legs of a Flight based on the distrution of timestamps.

        By default, the method stops a flight and yields a new one after a gap
        of 10 minutes without data.

        The length of the gap (here 10 minutes) can be expressed:

        - in the NumPy style: ``Flight.split(10, 'm')`` (see
          ``np.timedelta64``);
        - in the pandas style: ``Flight.split('10T')`` (see ``pd.Timedelta``)

        """ # default value is 10 m
self
value
Union[int, str]
unit
Optional[str]