tardis.transport.montecarlo.packets.trackers.array_utils module¶
Array utility functions for packet tracking.
These functions provide common array extension operations used by the packet tracking system.
- tardis.transport.montecarlo.packets.trackers.array_utils.extend_array(array: ndarray, new_length: int) ndarray[source]¶
Extend array to new length preserving existing data.
- Parameters:
- arraynp.ndarray
Array to extend.
- new_lengthint
New length for the array.
- Returns:
- np.ndarray
Extended array with original data preserved.
- tardis.transport.montecarlo.packets.trackers.array_utils.extend_float_array(array: ndarray, new_length: int) ndarray[source]¶
Extend float array with NaN default.
- Parameters:
- arraynp.ndarray
Array to extend.
- new_lengthint
New length for the array.
- Returns:
- np.ndarray
Extended array with NaN defaults for new elements.
- tardis.transport.montecarlo.packets.trackers.array_utils.extend_int_array(array: ndarray, new_length: int) ndarray[source]¶
Extend integer array with -1 default.
- Parameters:
- arraynp.ndarray
Array to extend.
- new_lengthint
New length for the array.
- Returns:
- np.ndarray
Extended array with -1 defaults for new elements.
- tardis.transport.montecarlo.packets.trackers.array_utils.extend_interaction_type_array(array: ndarray, new_length: int) ndarray[source]¶
Extend interaction type array with NO_INTERACTION default.
- Parameters:
- arraynp.ndarray
Array to extend.
- new_lengthint
New length for the array.
- Returns:
- np.ndarray
Extended array with NO_INTERACTION defaults for new elements.