MCPcopy
hub / github.com/stanford-futuredata/ColBERT / range

Function range

docs/html/_static/underscore-1.12.0.js:1791–1808  ·  view source on GitHub ↗
(start, stop, step)

Source from the content-addressed store, hash-verified

1789 // the native Python `range()` function. See
1790 // [the Python documentation](https://docs.python.org/library/functions.html#range).
1791 function range(start, stop, step) {
1792 if (stop == null) {
1793 stop = start || 0;
1794 start = 0;
1795 }
1796 if (!step) {
1797 step = stop < start ? -1 : 1;
1798 }
1799
1800 var length = Math.max(Math.ceil((stop - start) / step), 0);
1801 var range = Array(length);
1802
1803 for (var idx = 0; idx < length; idx++, start += step) {
1804 range[idx] = start;
1805 }
1806
1807 return range;
1808 }
1809
1810 // Chunk a single array into multiple arrays, each containing `count` or fewer
1811 // items.

Callers 15

ngramsMethod · 0.85
tokenizeMethod · 0.85
has_answerFunction · 0.85
locate_answersFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
process_pageFunction · 0.85
docs2passages.pyFile · 0.85
addMethod · 0.85
_get_chunk_idxMethod · 0.85
_remove_pid_from_ivfMethod · 0.85
_add_pid_to_ivfMethod · 0.85

Calls

no outgoing calls

Tested by 1

mainFunction · 0.68