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

Method SetZeros

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

SetZeros is simple convenience function initialize all values to 0

()

Source from the content-addressed store, hash-verified

245
246// SetZeros is simple convenience function initialize all values to 0
247func (tsr *Bits) SetZeros() {
248 ln := tsr.Len()
249 for j := 0; j < ln; j++ {
250 tsr.Values.Set(j, false)
251 }
252}
253
254// Clone clones this tensor, creating a duplicate copy of itself with its
255// own separate memory representation of all the values, and returns

Callers

nothing calls this directly

Calls 2

LenMethod · 0.95
SetMethod · 0.65

Tested by

no test coverage detected