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

Method SetShape

tensor/bits.go:100–104  ·  view source on GitHub ↗

SetShape sets the shape params, resizing backing storage appropriately

(sizes []int, names ...string)

Source from the content-addressed store, hash-verified

98
99// SetShape sets the shape params, resizing backing storage appropriately
100func (tsr *Bits) SetShape(sizes []int, names ...string) {
101 tsr.Shp.SetShape(sizes, names...)
102 nln := tsr.Len()
103 tsr.Values.SetLen(nln)
104}
105
106// SetNumRows sets the number of rows (outer-most dimension) in a RowMajor organized tensor.
107func (tsr *Bits) SetNumRows(rows int) {

Callers 2

NewBitsFunction · 0.95
CopyShapeFromMethod · 0.95

Calls 3

LenMethod · 0.95
SetLenMethod · 0.80
SetShapeMethod · 0.65

Tested by

no test coverage detected