MCPcopy
hub / github.com/dask/dask / check_divisions

Function check_divisions

dask/dataframe/core.py:258–268  ·  view source on GitHub ↗
(divisions)

Source from the content-addressed store, hash-verified

256
257
258def check_divisions(divisions):
259 if not isinstance(divisions, (list, tuple)):
260 raise ValueError("New division must be list or tuple")
261 divisions = list(divisions)
262 if len(divisions) == 0:
263 raise ValueError("New division must not be empty")
264 if divisions != sorted(divisions):
265 raise ValueError("New division must be sorted")
266 if len(divisions[:-1]) != len(list(unique(divisions[:-1]))):
267 msg = "New division must be unique, except for the last element"
268 raise ValueError(msg)
269
270
271def _map_freq_to_period_start(freq):

Callers 2

repartitionMethod · 0.90
set_indexMethod · 0.90

Calls 1

uniqueFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…