MCPcopy
hub / github.com/dask/dask / issorted

Function issorted

dask/array/slicing.py:563–573  ·  view source on GitHub ↗

Is sequence sorted? >>> issorted([1, 2, 3]) np.True_ >>> issorted([3, 1, 2]) np.False_

(seq)

Source from the content-addressed store, hash-verified

561
562
563def issorted(seq):
564 """Is sequence sorted?
565
566 >>> issorted([1, 2, 3])
567 np.True_
568 >>> issorted([3, 1, 2])
569 np.False_
570 """
571 if len(seq) == 0:
572 return True
573 return np.all(seq[:-1] <= seq[1:])
574
575
576class SlicingNoop(Exception):

Callers

nothing calls this directly

Calls 1

allMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…