MCPcopy
hub / github.com/tensorflow/tfjs / range

Function range

tfjs-layers/src/utils/math_utils.ts:157–166  ·  view source on GitHub ↗
(begin: number, end: number)

Source from the content-addressed store, hash-verified

155 * @throws ValueError, iff `end` < `begin`.
156 */
157export function range(begin: number, end: number): number[] {
158 if (end < begin) {
159 throw new ValueError(`end (${end}) < begin (${begin}) is forbidden.`);
160 }
161 const out: number[] = [];
162 for (let i = begin; i < end; ++i) {
163 out.push(i);
164 }
165 return out;
166}

Callers 4

testLoopMethod · 0.90
fitLoopMethod · 0.90
constructorMethod · 0.90

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…