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

Function M

test/compute-engine/linear-algebra.test.ts:1846–1849  ·  view source on GitHub ↗
(rows: number[][])

Source from the content-addressed store, hash-verified

1844 const result = ce.expr(['Norm', ['Tuple', -3, 4], 1]).evaluate();
1845 expect(result.toString()).toMatchInlineSnapshot(`7`);
1846 });
1847
1848 it('should compute the L-infinity norm of a Tuple', () => {
1849 // max(|-3|, |4|) = 4
1850 const result = ce.expr(['Norm', ['Tuple', -3, 4], 'Infinity']).evaluate();
1851 expect(result.toString()).toMatchInlineSnapshot(`4`);
1852 });

Callers 1

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected