MCPcopy Create free account
hub / github.com/bitanath/pca / assertValidMatrices

Function assertValidMatrices

src/assert.ts:28–35  ·  view source on GitHub ↗
(a: Matrix, b: Matrix, aName: string, bName: string)

Source from the content-addressed store, hash-verified

26}
27
28export function assertValidMatrices(a: Matrix, b: Matrix, aName: string, bName: string): void {
29 assertValidMatrix(a,aName)
30 assertValidMatrix(b,bName)
31
32 if (b.length !== a[0]!.length) {
33 throw new Error(`Columns in ${aName} should be the same as the number of rows in ${bName}`);
34 }
35}

Callers 2

multiplyFunction · 0.85
multiplyAndScaleFunction · 0.85

Calls 1

assertValidMatrixFunction · 0.85

Tested by

no test coverage detected