DimSizeByName returns the size of given dimension, specified by name. will crash if name not found.
(name string)
| 89 | // DimSizeByName returns the size of given dimension, specified by name. |
| 90 | // will crash if name not found. |
| 91 | func (sh *Shape) DimSizeByName(name string) int { |
| 92 | return sh.DimSize(sh.DimByName(name)) |
| 93 | } |
| 94 | |
| 95 | // IndexIsValid() returns true if given index is valid (within ranges for all dimensions) |
| 96 | func (sh *Shape) IndexIsValid(idx []int) bool { |