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

Method CopyShapeFrom

tensor/string.go:236–238  ·  view source on GitHub ↗

CopyShapeFrom copies just the shape from given source tensor calling SetShape with the shape params from source (see for more docs).

(frm Tensor)

Source from the content-addressed store, hash-verified

234// CopyShapeFrom copies just the shape from given source tensor
235// calling SetShape with the shape params from source (see for more docs).
236func (tsr *String) CopyShapeFrom(frm Tensor) {
237 tsr.SetShape(frm.Shape().Sizes, frm.Shape().Names...)
238}
239
240// CopyCellsFrom copies given range of values from other tensor into this tensor,
241// using flat 1D indexes: to = starting index in this Tensor to start copying into,

Callers

nothing calls this directly

Calls 2

SetShapeMethod · 0.65
ShapeMethod · 0.65

Tested by

no test coverage detected