(m)
| 44 | * @throws {Error} |
| 45 | */ |
| 46 | const validate2D = (m) => { |
| 47 | validateType(m); |
| 48 | const aShape = shape(m); |
| 49 | if (aShape.length !== 2) { |
| 50 | throw new Error('Matrix is not of 2D shape'); |
| 51 | } |
| 52 | }; |
| 53 | |
| 54 | /** |
| 55 | * Validates that matrices are of the same shape. |
no test coverage detected