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

Method Clone

tensor/string.go:214–218  ·  view source on GitHub ↗

Clone clones this tensor, creating a duplicate copy of itself with its own separate memory representation of all the values, and returns that as a Tensor (which can be converted into the known type as needed).

()

Source from the content-addressed store, hash-verified

212// own separate memory representation of all the values, and returns
213// that as a Tensor (which can be converted into the known type as needed).
214func (tsr *String) Clone() Tensor {
215 csr := NewStringShape(&tsr.Shp)
216 copy(csr.Values, tsr.Values)
217 return csr
218}
219
220// CopyFrom copies all avail values from other tensor into this tensor, with an
221// optimized implementation if the other tensor is of the same type, and

Callers

nothing calls this directly

Calls 1

NewStringShapeFunction · 0.85

Tested by

no test coverage detected