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

Method CopyShapeFrom

tensor/bits.go:279–281  ·  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

277// CopyShapeFrom copies just the shape from given source tensor
278// calling SetShape with the shape params from source (see for more docs).
279func (tsr *Bits) CopyShapeFrom(frm Tensor) {
280 tsr.SetShape(frm.Shape().Sizes, frm.Shape().Names...)
281}
282
283// CopyCellsFrom copies given range of values from other tensor into this tensor,
284// using flat 1D indexes: to = starting index in this Tensor to start copying into,

Callers

nothing calls this directly

Calls 2

SetShapeMethod · 0.95
ShapeMethod · 0.65

Tested by

no test coverage detected