MCPcopy Create free account
hub / github.com/cogentcore/core / DimSizeByName

Method DimSizeByName

tensor/shape.go:91–93  ·  view source on GitHub ↗

DimSizeByName returns the size of given dimension, specified by name. will crash if name not found.

(name string)

Source from the content-addressed store, hash-verified

89// DimSizeByName returns the size of given dimension, specified by name.
90// will crash if name not found.
91func (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)
96func (sh *Shape) IndexIsValid(idx []int) bool {

Callers

nothing calls this directly

Calls 2

DimSizeMethod · 0.95
DimByNameMethod · 0.95

Tested by

no test coverage detected