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

Function NewShape

tensor/shape.go:31–35  ·  view source on GitHub ↗

NewShape returns a new shape with given sizes and optional dimension names. RowMajor ordering is used by default.

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

Source from the content-addressed store, hash-verified

29// NewShape returns a new shape with given sizes and optional dimension names.
30// RowMajor ordering is used by default.
31func NewShape(sizes []int, names ...string) *Shape {
32 sh := &Shape{}
33 sh.SetShape(sizes, names...)
34 return sh
35}
36
37// SetShape sets the shape size and optional names
38// RowMajor ordering is used by default.

Callers 3

WriteCSVRowWriterMethod · 0.92
TableHeadersMethod · 0.92
AddShapesFunction · 0.85

Calls 1

SetShapeMethod · 0.95

Tested by

no test coverage detected