MCPcopy Create free account
hub / github.com/dask/dask / digit

Function digit

dask/utils.py:1146–1158  ·  view source on GitHub ↗

>>> digit(1234, 0, 10) 4 >>> digit(1234, 1, 10) 3 >>> digit(1234, 2, 10) 2 >>> digit(1234, 3, 10) 1

(n, k, base)

Source from the content-addressed store, hash-verified

1144
1145
1146def digit(n, k, base):
1147 """
1148
1149 >>> digit(1234, 0, 10)
1150 4
1151 >>> digit(1234, 1, 10)
1152 3
1153 >>> digit(1234, 2, 10)
1154 2
1155 >>> digit(1234, 3, 10)
1156 1
1157 """
1158 return n // base**k % base
1159
1160
1161def insert(tup, loc, val):

Callers 2

groupby_tasksFunction · 0.90
_layerMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected