Documentation
¶
Index ¶
- func Linspace(start, stop float64, numPoints int) []float64
- func ProdInt(x []int) int
- type NdArray
- func Add(a, b *NdArray) (*NdArray, error)
- func ApplyOp(a, b *NdArray, op func(float64, float64) float64) (*NdArray, error)
- func Divide(a, b *NdArray) (*NdArray, error)
- func Multiply(a, b *NdArray) (*NdArray, error)
- func NewNdArray(shape []int, data []float64) (*NdArray, error)
- func Subtract(a, b *NdArray) (*NdArray, error)
- func Zeros(shape []int) *NdArray
- func (a *NdArray) AddScalar(b float64) *NdArray
- func (a *NdArray) ApplyHadamardOp(op func(float64) float64) error
- func (a *NdArray) Get(index []int) (float64, error)
- func (x *NdArray) InsertAxis(pos int) *NdArray
- func (a *NdArray) MulScalar(b float64) *NdArray
- func (x *NdArray) Reshape(shape []int) *NdArray
- func (a *NdArray) Shape() []int
- func (a *NdArray) SubScalar(b float64) *NdArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type NdArray ¶
type NdArray struct {
Data []float64
// contains filtered or unexported fields
}
NdArray represents a multi-dimensional array with shape and data.
func NewNdArray ¶
NewNdArray creates a new NdArray given a shape and initial data.
func (*NdArray) InsertAxis ¶
Click to show internal directories.
Click to hide internal directories.