tracktable.script_helpers module¶
Submodules¶
- tracktable.script_helpers.argparse module
- tracktable.script_helpers.argument_groups module
- Submodules
- tracktable.script_helpers.argument_groups.dt_point_loader module
- tracktable.script_helpers.argument_groups.image module
- tracktable.script_helpers.argument_groups.mapmaker module
- tracktable.script_helpers.argument_groups.movie_rendering module
- tracktable.script_helpers.argument_groups.parallel module
- tracktable.script_helpers.argument_groups.trajectory_assembly module
- tracktable.script_helpers.argument_groups.trajectory_rendering module
- tracktable.script_helpers.argument_groups.utilities module
- Module contents
- Submodules
Module contents¶
Tracktable Trajectory Toolkit - Helper functions for creating scripts
- tracktable.script_helpers.n_at_a_time(iterable, howmany, fillvalue=None)[source]¶
Collect data into fixed-length chunks or blocks
This function is an adapter for an iterable that returns objects N at a time instead of one at a time.
Example
>>> list(n_at_a_time(range(10), 3, -1)) [(0, 1, 2), (3, 4, 5), (6, 7, 8), (9, -1, -1)]
- Args:
iterable {sequence}: Data source howmany {int}: How many elements to take at a time fillvalue {any}: Value to pad with if the iterable runs out
- Returns:
New sequence whose elements are tuples of elements from the original iterable