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

Method SetString

tensor/bits.go:135–140  ·  view source on GitHub ↗
(i []int, val string)

Source from the content-addressed store, hash-verified

133}
134
135func (tsr *Bits) SetString(i []int, val string) {
136 if bv, err := reflectx.ToBool(val); err == nil {
137 j := tsr.Shp.Offset(i)
138 tsr.Values.Set(j, bv)
139 }
140}
141
142func (tsr *Bits) Float1D(off int) float64 {
143 return BoolToFloat64(tsr.Values.Index(off))

Callers

nothing calls this directly

Calls 3

ToBoolFunction · 0.92
OffsetMethod · 0.80
SetMethod · 0.65

Tested by

no test coverage detected