def check_sorted(array):
    # this ignores NANs, and does the right thing if nans
    # are concentrated at beginning or end of array
    # otherwise, it will miss things at nan/finite boundaries
    array = np.asarray(array)
    return not (array[:-1] > array[1:]).any()
Return `True` if the array is sorted, `False` otherwise.
dataset/ETHPy150Open glue-viz/glue/glue/utils/array.py/check_sorted