(shape: number[])
| 676 | } |
| 677 | |
| 678 | export function assertNonNegativeIntegerDimensions(shape: number[]) { |
| 679 | shape.forEach(dimSize => { |
| 680 | assert( |
| 681 | Number.isInteger(dimSize) && dimSize >= 0, |
| 682 | () => |
| 683 | `Tensor must have a shape comprised of positive integers but got ` + |
| 684 | `shape [${shape}].`); |
| 685 | }); |
| 686 | } |
| 687 | |
| 688 | /** |
| 689 | * Computes flat index for a given location (multidimentionsal index) in a |
no test coverage detected
searching dependent graphs…