Documentation
¶
Overview ¶
Package shape defines the shape of an array.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayI ¶
type ArrayI[T dtype.GoDataType] interface { // Shape returns the size of all the axes of the array. Shape() []int // Flat returns the data stored by the array. // The length of the returned slice should match the size of the shape. Flat() []T }
ArrayI is a minimum generic array interface.
type Shape ¶
Shape represents the shape of an array, that is the datatype of the elements stored in the array and a list of axis lengths in major-to-minor order.
func (*Shape) ByteSize ¶
ByteSize returns the size of the buffer, in bytes, to store the data specified by the shape.
func (*Shape) IsAtomic ¶
IsAtomic returns true for the shape of an atomic value, that is a single value with no axis.
func (*Shape) OuterAxisLength ¶
OuterAxisLength returns the shape's outermost axis length, or 1 for rank-0 shapes.
Click to show internal directories.
Click to hide internal directories.