HyRex.array_with_padding module
- class HyRex.array_with_padding.array_with_padding(arr)[source]
Bases:
ModuleArray container with automatic padding management.
Manages arrays with trailing infinite padding, tracking the last valid element for efficient concatenation operations.
Attributes:
arrarrayFull array including padding elements
padding_sizeintNumber of infinite padding elements at end
lastnumintIndex of last valid (non-infinite) element
lastvalfloatValue of last valid element
- concat(other_arr)[source]
Concatenate with another padded array.
Combines two padded arrays by removing padding from the first array and appending the second array, then recomputing padding length.
Parameters:
other_arrarray_with_paddingSecond array to concatenate after this one
Returns:
- array_with_padding
New padded array containing concatenated data