func Zeros(size ...int) NDArray {
	return Dense(size...)
}
Create an NDArray of float64 values, initialized to zero
package matrix
import (
	"fmt"
	"math/rand"
	"time"
)
func init() {
	rand.Seed(time.Now().UnixNano())
}
type ArraySparsity int
const (
	DenseArray ArraySparsity = iota
	SparseCooMatrix
	SparseDiagMatrix
)
type NDArray interface {
	Add(others ...NDArray) NDArray
	All() bool
	AllF(f func(v float64) bool) bool
	AllF2(f func(v1, v2 float64) bool, other NDArray) bool
	Any() bool
	AnyF(f func(v float64) bool) bool
	AnyF2(f func(v1, v2 float64) bool, other NDArray) bool
	Apply(f func(float64) float64) NDArray
	Array() []float64
	Concat(axis int, others ...NDArray) NDArray
	Copy() NDArray
	CountNonzero() int
	Dense() NDArray
	Div(others ...NDArray) NDArray
	Equal(other NDArray) bool
	Fill(value float64)
	FlatCoord(index int) []int
	FlatItem(index int) float64
	FlatItemSet(value float64, index int)
	Item(index ...int) float64
	ItemAdd(value float64) NDArray
	ItemDiv(value float64) NDArray
	ItemProd(value float64) NDArray
	ItemSub(value float64) NDArray
	ItemSet(value float64, index ...int)
	M() Matrix
	Max() float64
	Min() float64
	Prod(others ...NDArray) NDArray
	NDim() int
	Normalize() NDArray
	Ravel() NDArray
	Shape() []int
	Size() int
	Slice(from []int, to []int) NDArray
	Sparsity() ArraySparsity
	Sub(others ...NDArray) NDArray
	Sum() float64
	Visit(f func(pos []int, value float64) bool) bool
	VisitNonzero(f func(pos []int, value float64) bool) bool
}
func A(shape []int, values ...float64) NDArray {
	size := 1
	for _, sz := range shape {
		size *= sz
	}
	if len(values) != size {
		panic(fmt.Sprintf("Expected %d array elements but got %d", size, len(values)))
	}
	array := &denseF64Array{
		shape: shape,
		array: make([]float64, len(values)),
	}
	copy(array.array[:], values[:])
	return array
}
func A1(values ...float64) NDArray {
	return A([]int{len(values)}, values...)
}
func A2(rows ...[]float64) NDArray {
	array := &denseF64Array{
		shape: []int{len(rows), len(rows[0])},
		array: make([]float64, len(rows)*len(rows[0])),
	}
	for i0 := 0; i0 < array.shape[0]; i0++ {
		if len(rows[i0]) != array.shape[1] {
			panic(fmt.Sprintf("A2 got inconsistent array lengths %d and %d", array.shape[1], len(rows[i0])))
		}
		for i1 := 0; i1 < array.shape[1]; i1++ {
			array.ItemSet(rows[i0][i1], i0, i1)
		}
	}
	return array
}
func Dense(size ...int) NDArray {
	totalSize := 1
	for _, sz := range size {
		totalSize *= sz
	}
	return &denseF64Array{
		shape: size,
		array: make([]float64, totalSize),
	}
}
func WithValue(value float64, size ...int) NDArray {
	array := Dense(size...)
	array.Fill(value)
	return array
}