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

Function arrayProd

tfjs-layers/src/utils/math_utils.ts:40–54  ·  view source on GitHub ↗
(
    array: number[]|ArrayTypes, begin?: number, end?: number)

Source from the content-addressed store, hash-verified

38 * @return The product.
39 */
40export function arrayProd(
41 array: number[]|ArrayTypes, begin?: number, end?: number): number {
42 if (begin == null) {
43 begin = 0;
44 }
45 if (end == null) {
46 end = array.length;
47 }
48
49 let prod = 1;
50 for (let i = begin; i < end; ++i) {
51 prod *= array[i];
52 }
53 return prod;
54}
55
56/**
57 * Compute minimum value.

Callers 4

computeFansFunction · 0.90
computeOutputShapeMethod · 0.90
fixUnknownDimensionMethod · 0.90
core_test.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…