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

Method SetFloats

tensor/string.go:152–156  ·  view source on GitHub ↗

SetFloats sets tensor values from a []float64 slice (copies values).

(flt []float64)

Source from the content-addressed store, hash-verified

150
151// SetFloats sets tensor values from a []float64 slice (copies values).
152func (tsr *String) SetFloats(flt []float64) {
153 for i, v := range flt {
154 tsr.Values[i] = Float64ToString(v)
155 }
156}
157
158// At is the gonum/mat.Matrix interface method for returning 2D matrix element at given
159// row, column index. Assumes Row-major ordering and logs an error if NumDims < 2.

Callers

nothing calls this directly

Calls 1

Float64ToStringFunction · 0.85

Tested by

no test coverage detected