(
shapeA: number[], shapeB: number[], errorMessagePrefix = '')
| 27 | } |
| 28 | |
| 29 | export function assertShapesMatch( |
| 30 | shapeA: number[], shapeB: number[], errorMessagePrefix = ''): void { |
| 31 | assert( |
| 32 | arraysEqual(shapeA, shapeB), |
| 33 | errorMessagePrefix + ` Shapes ${shapeA} and ${shapeB} must match`); |
| 34 | } |
| 35 | |
| 36 | export function arraysEqual(n1: number[]|TypedArray, n2: number[]|TypedArray) { |
| 37 | if (n1.length !== n2.length) { |
no test coverage detected
searching dependent graphs…