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

Function tensorOf

test/compute-engine/linear-algebra.test.ts:1850–1853  ·  view source on GitHub ↗
(m: Expression)

Source from the content-addressed store, hash-verified

1848 it('is lazy for a large extent before an empty axis', () => {
1849 // 10^9 empty rows: an eager list would allocate them all.
1850 const rows = ce.expr(['Zeros', 1000000000, 0]).evaluate();
1851 expect(rows.operator).toBe('Repeat');
1852 expect(ce.box(['Length', rows]).evaluate().re).toBe(1000000000);
1853 expect(ce.box(['At', rows, 5]).evaluate().toString()).toBe('[]');
1854 // An extent above 2^53 is not read as 0.
1855 const huge = ce
1856 .expr(['Fill', 7, { num: '100000000000000000000' }, 0])

Callers 1

Calls 3

isTensorFunction · 0.90
evaluateMethod · 0.65
exprMethod · 0.65

Tested by

no test coverage detected