MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / isUpperTriangular

Function isUpperTriangular

src/compute-engine/tensor/tensors.ts:250–258  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

248 return fill([]);
249 }
250
251 /** Indices are 1-based, return a 0-based index in the data */
252 private _index(indices: number[]): number {
253 const strides = this._strides;
254 return indices.reduce((acc, val, dim) => acc + (val - 1) * strides[dim], 0);
255 // let index = 0;
256 // for (let i = 0; i < indices.length; i++) {
257 // index += indices[i] * this._strides[i];
258 // }
259 // return index;
260 }
261

Callers

nothing calls this directly

Calls 2

isZeroFunction · 0.70
bindMethod · 0.65

Tested by

no test coverage detected