neuralib.util.segments.as_segment
- neuralib.util.segments.as_segment(segs)[source]
- Parameters:
segs (ndarray | tuple[float, float] | list[tuple[float, float]]) – Input segment-like data that can be converted to a 2D array of floats.
- Returns:
A numpy 2D array representation of the input segments.
- Raises:
ValueError – If the input cannot be reshaped to a (N, 2) segment array.
- Return type:
ndarray