Resample the covered duration.
Time]) – If an integer is passed, the covered time period will be divided into equally sized time steps so that the total number of time steps is equal to the passed number. If a timedelta is passed, the whole period will be resampled so that the difference between all time steps matches the timedelta. Note that the boundaries of the time period will not change. Therefore, the timedelta between the last two time values might differ from the desired timedelta.
Resampled time object
- Return type
>>> from weldx import Time >>> t = Time(["3s","6s","7s", "9s"])
Resample using an integer:
>>> t.resample(4) Time: TimedeltaIndex(['0 days 00:00:03', '0 days 00:00:05', '0 days 00:00:07', '0 days 00:00:09'], dtype='timedelta64[ns]', freq=None)
Resample with a time delta:
>>> t.resample("1.5s") Time: TimedeltaIndex([ '0 days 00:00:03', '0 days 00:00:04.500000', '0 days 00:00:06', '0 days 00:00:07.500000', '0 days 00:00:09'], dtype='timedelta64[ns]', freq='1500L')