neuralib.util.segments.is_sorted
- neuralib.util.segments.is_sorted(a, strict=False)[source]
Check if array is sorted. [reference](https://stackoverflow.com/a/47004507)
- Parameters:
a (ndarray) – Input array to check for sorted order.
strict (bool) – If True, checks for strictly increasing order. Otherwise, checks for non-decreasing order.
- Returns:
Returns True if the input array is sorted based on the specified criteria, else False.
- Return type:
bool