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

Method Len

tensor/bits.go:75–75  ·  view source on GitHub ↗

Len returns the number of elements in the tensor (product of shape dimensions).

()

Source from the content-addressed store, hash-verified

73
74// Len returns the number of elements in the tensor (product of shape dimensions).
75func (tsr *Bits) Len() int { return tsr.Shp.Len() }
76
77// NumDims returns the total number of dimensions.
78func (tsr *Bits) NumDims() int { return tsr.Shp.NumDims() }

Callers 7

NewBitsFunction · 0.95
NewBitsShapeFunction · 0.95
SetShapeMethod · 0.95
FloatsMethod · 0.95
SetFloatsMethod · 0.95
SetZerosMethod · 0.95
StringMethod · 0.95

Calls 1

LenMethod · 0.65

Tested by

no test coverage detected